Skip to content

Commit

Permalink
Merge pull request #3 from yihuang/release/v1.2.x
Browse files Browse the repository at this point in the history
cache first version for legacy versions (backport: cosmos#1018)
  • Loading branch information
yihuang authored Dec 16, 2024
2 parents a3e0980 + a5e2513 commit dcec979
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- [#961](https://github.com/cosmos/iavl/pull/961) Add new `GetLatestVersion` API to get the latest version.
- [#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.
- [#1018](https://github.com/cosmos/iavl/pull/1018) Cache first version for legacy versions, fix performance regression after upgrade.

## v1.2.0 May 13, 2024

Expand Down
1 change: 1 addition & 0 deletions nodedb.go
Original file line number Diff line number Diff line change
Expand Up @@ -740,6 +740,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 dcec979

Please sign in to comment.