Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WaitForFlushMemTables may hang up if mempurge is used #11250

Open
ywave620 opened this issue Feb 24, 2023 · 0 comments · May be fixed by #11251
Open

WaitForFlushMemTables may hang up if mempurge is used #11250

ywave620 opened this issue Feb 24, 2023 · 0 comments · May be fixed by #11251
Assignees
Labels
bug Confirmed RocksDB bugs

Comments

@ywave620
Copy link
Contributor

ywave620 commented Feb 24, 2023

Note: Please use Issues only for bug reports. For questions, discussions, feature requests, etc. post to dev group: https://groups.google.com/forum/#!forum/rocksdb or https://www.facebook.com/groups/rocksdb.dev

Expected behavior

DB::Impl::Flush() returns Status::OK()

Actual behavior

DB::Impl::Flush() hangs up

Steps to reproduce the behavior

Let a flush job starts and make sure it use mempurge (by doing writes against a small set of keys), before it finishes, call DB::Impl::Flush().

See the db/db_flush_test.cc MempurgeInterleavedWithNormalFlush in #11251 for more details.

Explanation

We have two flush jobs, the first one uses mempurge while the second one use normal flush.

Recall that mempurge adds its output, a MemTable with the same id of one of its input to the immutable memtable list. The existence of the output let DBImpl::WaitForFlushMemTables hang because this wait breaking condition
cfds[i]->imm()->GetEarliestMemTableID() > *flush_memtable_ids[i] will never be met until a third flush job is started.

@ywave620 ywave620 linked a pull request Feb 24, 2023 that will close this issue
@akankshamahajan15 akankshamahajan15 linked a pull request Mar 2, 2023 that will close this issue
@ajkr ajkr added the bug Confirmed RocksDB bugs label May 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed RocksDB bugs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants