Skip to content

Commit

Permalink
cache first version for legacy versions (backport #1018) (#1020)
Browse files Browse the repository at this point in the history
Co-authored-by: yihuang <huang@crypto.com>
Co-authored-by: Marko Baricevic <marbar3778@yahoo.com>
  • Loading branch information
3 people authored Dec 16, 2024
1 parent ee6810d commit a6e703c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@
- [#955](https://github.com/cosmos/iavl/pull/955) Get rid of `cosmos-db` deps completely.
- [#965](https://github.com/cosmos/iavl/pull/965) Use expected interface for expected IAVL `Logger`.
- [#970](https://github.com/cosmos/iavl/pull/970) Close the pruning process when the nodeDB is closed.
- [#980](https://github.com/cosmos/iavl/pull/980) Use the `sdk/core/store.KVStoreWithBatch` interface instead of `iavl/db.DB` interface
- [#1018](https://github.com/cosmos/iavl/pull/1018) Cache first version for legacy versions, fix performance regression after upgrade.
1 change: 1 addition & 0 deletions nodedb.go
Original file line number Diff line number Diff line change
Expand Up @@ -739,6 +739,7 @@ func (ndb *nodeDB) getFirstVersion() (int64, error) {
if itr.Valid() {
var version int64
legacyRootKeyFormat.Scan(itr.Key(), &version)
ndb.resetFirstVersion(version)
return version, nil
}
// Find the first version
Expand Down

0 comments on commit a6e703c

Please sign in to comment.