Skip to content
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

* [#1747](https://github.com/crypto-org-chain/cronos/pull/1747) Skip batch initialization and flush when fixdata with dry-run.
* [#1779](https://github.com/crypto-org-chain/cronos/pull/1779) Upgrade rocksdb to `v9.11.2`.
* [#1780](https://github.com/crypto-org-chain/cronos/pull/1780) memiavl LoadVersion loads up to the target version instead of exact version.

### State Machine Breaking

Expand Down
1 change: 1 addition & 0 deletions integration_tests/configs/default.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
'zero-copy': true,
'snapshot-interval': 5,
'cache-size': 0,
'async-commit-buffer': 5,
},
versiondb: {
enable: true,
Expand Down
8 changes: 5 additions & 3 deletions memiavl/multitree.go
Original file line number Diff line number Diff line change
Expand Up @@ -326,8 +326,10 @@ func (t *MultiTree) CatchupWAL(wal *wal.Log, endVersion int64) error {
return nil
}

endIndex := lastIndex
if endVersion != 0 {
var endIndex uint64
if endVersion == 0 {
endIndex = lastIndex
} else {
endIndex = walIndex(endVersion, t.initialVersion)
}

Expand All @@ -336,7 +338,7 @@ func (t *MultiTree) CatchupWAL(wal *wal.Log, endVersion int64) error {
}

if endIndex > lastIndex {
return fmt.Errorf("target index %d is in the future, latest index: %d", endIndex, lastIndex)
endIndex = lastIndex
}

for i := firstIndex; i <= endIndex; i++ {
Expand Down
Loading