Skip to content

Commit

Permalink
revert some
Browse files Browse the repository at this point in the history
  • Loading branch information
kocubinski committed Oct 31, 2024
1 parent 81b4a52 commit 507b04b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Binary file added cmd/legacydump/legacydump
Binary file not shown.
7 changes: 3 additions & 4 deletions mutable_tree.go
Original file line number Diff line number Diff line change
Expand Up @@ -466,11 +466,11 @@ func (tree *MutableTree) LoadVersion(targetVersion int64) (int64, error) {
tree.ndb.opts.InitialVersion, firstVersion)
}

if latestVersion >= 0 && latestVersion < targetVersion {
if latestVersion < targetVersion {
return latestVersion, fmt.Errorf("wanted to load target %d but only found up to %d", targetVersion, latestVersion)
}

if firstVersion <= 0 {
if firstVersion == 0 {
if targetVersion <= 0 {
if !tree.skipFastStorageUpgrade {
tree.mtx.Lock()
Expand Down Expand Up @@ -556,8 +556,7 @@ func (tree *MutableTree) IsUpgradeable() (bool, error) {
if err != nil {
return false, err
}
hasUpgradedToFastStorage := tree.ndb.hasUpgradedToFastStorage()
return !tree.skipFastStorageUpgrade && (!hasUpgradedToFastStorage || shouldForce), nil
return !tree.skipFastStorageUpgrade && (!tree.ndb.hasUpgradedToFastStorage() || shouldForce), nil
}

// enableFastStorageAndCommitIfNotEnabled if nodeDB doesn't mark fast storage as enabled, enable it, and commit the update.
Expand Down

0 comments on commit 507b04b

Please sign in to comment.