facebook / rocksdb

A library that provides an embeddable, persistent key-value store for fast storage.
http://rocksdb.org
GNU General Public License v2.0
27.83k stars 6.2k forks source link

Fix assertion failure in ConstructFragmentedRangeTombstones() #12796

Closed cbi42 closed 1 week ago

cbi42 commented 1 week ago

Summary: the assertion assert(!IsFragmentedRangeTombstonesConstructed(false)); assumes ConstructFragmentedRangeTombstones() is called only once for a memtable. This is not true since SwitchMemtable() can be called multiple times on the same live memtable, if a previous attempt fails. So remove the assertion in this PR and simplify relevant code.

Test plan: the exact condition to trigger manifest write in SwitchMemtable() is complicated. Will monitor crash test to see if there's no more failure.

facebook-github-bot commented 1 week ago

@cbi42 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot commented 1 week ago

@cbi42 merged this pull request in facebook/rocksdb@b4a84efb4e842b782e976de5b22a4554c2f76edd.