]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/commit
Fix flush picking non-consecutive memtables (#10921)
authorAndrew Kryczka <andrewkr@fb.com>
Fri, 4 Nov 2022 22:55:54 +0000 (15:55 -0700)
committerAndrew Kryczka <andrewkr@fb.com>
Thu, 24 Nov 2022 21:43:36 +0000 (13:43 -0800)
commit8c069883131b4750cd70164a828db8611599e7dc
tree95b5ad91af5fcc2c3aa6d28a1bab29920f49a454
parent8d5edb693c033d898785b15525f6d2c2a0a10009
Fix flush picking non-consecutive memtables (#10921)

Summary:
Prevents `MemTableList::PickMemtablesToFlush()` from picking non-consecutive memtables. It leads to wrong ordering in L0 if the files are committed, or an error like below if force_consistency_checks=true catches it:

```
Corruption: force_consistency_checks: VersionBuilder: L0 file https://github.com/facebook/rocksdb/issues/25 with seqno 320416 368066 vs. file https://github.com/facebook/rocksdb/issues/24 with seqno 336037 352068
```

Pull Request resolved: https://github.com/facebook/rocksdb/pull/10921

Test Plan: fix the expectation in the existing test of this behavior

Reviewed By: riversand963

Differential Revision: D41046935

Pulled By: ajkr

fbshipit-source-id: 783696bff56115063d5dc5856dfaed6a9881d1ab
HISTORY.md
db/memtable_list.cc
db/memtable_list_test.cc