Skip to content

Commit

Permalink
Fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
yzang2019 committed Jan 7, 2025
1 parent 4fee0b1 commit 87040c8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 0 additions & 3 deletions sc/memiavl/multitree.go
Original file line number Diff line number Diff line change
Expand Up @@ -340,9 +340,6 @@ func (t *MultiTree) Catchup(stream types.Stream[proto.ChangelogEntry], endVersio
}

var replayCount = 0
for _, tree := range t.trees {
tree.StartBackgroundWrite()
}
err = stream.Replay(firstIndex, endIndex, func(index uint64, entry proto.ChangelogEntry) error {
if err := t.ApplyUpgrades(entry.Upgrades); err != nil {
return err
Expand Down
3 changes: 3 additions & 0 deletions sc/memiavl/tree.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@ func (t *Tree) ApplyChangeSet(changeSet iavl.ChangeSet) {
}

func (t *Tree) ApplyChangeSetAsync(changeSet iavl.ChangeSet) {
if t.pendingChanges == nil {
t.StartBackgroundWrite()
}
t.pendingChanges <- changeSet
}

Expand Down
1 change: 0 additions & 1 deletion ss/pebbledb/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ func (db *Database) SetLatestVersion(version int64) error {
var ts [VersionSize]byte
binary.LittleEndian.PutUint64(ts[:], uint64(version))
err := db.storage.Set([]byte(latestVersionKey), ts[:], defaultWriteOpts)
fmt.Printf("SetLatestVersion: version=%d, err=%v, latestVersionKey=%s\n", version, err, latestVersionKey)
return err
}

Expand Down

0 comments on commit 87040c8

Please sign in to comment.