Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(rocksdb): correctly resolve rocksdb path (#1767) (backport #1776) #1777

Merged
merged 2 commits into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Ref: https://keepachangelog.com/en/1.0.0/

- (metrics) [#1668] Adds non-state breaking x/metrics module for custom telemetry.
- (metrics) [#1669] Add performance timing metrics to all Begin/EndBlockers
- (rocksdb) [#1767] Fix resolution of rocksdb database path

## [v0.17.3](https://github.com/Kava-Labs/kava/releases/tag/v0.17.3)

Expand Down Expand Up @@ -166,5 +167,6 @@ Bump tendermint version to 0.32.10 to address [cosmos security advisory Lavender

[\#257](https://github.com/Kava-Labs/kava/pulls/257) Include scripts to run large-scale simulations remotely using aws-batch

[#1767]: https://github.com/Kava-Labs/kava/pull/1767
[#1669]: https://github.com/Kava-Labs/kava/pull/1669
[#1668]: https://github.com/Kava-Labs/kava/pull/1668
5 changes: 3 additions & 2 deletions cmd/kava/opendb/opendb_rocksdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ const (
func OpenDB(appOpts types.AppOptions, home string, backendType dbm.BackendType) (dbm.DB, error) {
dataDir := filepath.Join(home, "data")
if backendType == dbm.RocksDBBackend {
return openRocksdb(filepath.Join(dataDir, "application.db"), appOpts)
return openRocksdb(dataDir, appOpts)
}

return dbm.NewDB("application", backendType, dataDir)
Expand All @@ -90,7 +90,8 @@ func OpenDB(appOpts types.AppOptions, home string, backendType dbm.BackendType)
// openRocksdb loads existing options, overrides some of them with appOpts and opens database
// option will be overridden only in case if it explicitly specified in appOpts
func openRocksdb(dir string, appOpts types.AppOptions) (dbm.DB, error) {
dbOpts, cfOpts, err := loadLatestOptions(dir)
optionsPath := filepath.Join(dir, "application.db")
dbOpts, cfOpts, err := loadLatestOptions(optionsPath)
if err != nil {
return nil, err
}
Expand Down