Skip to content

Commit

Permalink
skip non-zero version
Browse files Browse the repository at this point in the history
  • Loading branch information
yihuang committed Nov 12, 2024
1 parent 0fa8212 commit 4dd1645
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions versiondb/tsrocksdb/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,11 +305,12 @@ func (s Store) loadWrongData(storeName string) ([]KVPairWithTS, error) {
var pairs []KVPairWithTS
for ; iter.Valid(); iter.Next() {
ts := iter.Timestamp()
key := iter.Key()
if binary.LittleEndian.Uint64(ts) != 0 {
return nil, fmt.Errorf("invalid timestamp: %X, store: %s, key: %X", ts, storeName, key)
// FIXME: https://github.com/crypto-org-chain/cronos/issues/1689
continue

Check warning on line 310 in versiondb/tsrocksdb/store.go

View check run for this annotation

Codecov / codecov/patch

versiondb/tsrocksdb/store.go#L309-L310

Added lines #L309 - L310 were not covered by tests
}

key := iter.Key()
if len(key) < TimestampSize {
return nil, fmt.Errorf("invalid key length: %X, store: %s", key, storeName)
}

Check warning on line 316 in versiondb/tsrocksdb/store.go

View check run for this annotation

Codecov / codecov/patch

versiondb/tsrocksdb/store.go#L315-L316

Added lines #L315 - L316 were not covered by tests
Expand Down

0 comments on commit 4dd1645

Please sign in to comment.