-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
fix bug about NewCompactOnDeletionCollectorFactory hasn't effect on L0 flush #5669
Conversation
flush. Because builder->Finish will reset need_compact_ = false;
There is no variable |
“There is no variable need_comapct_ in the code base”,you can review this code, "builder->Finish()" as below stack.
and then
so, as f5 BuildTable function describe, it can be simplify as below.
Finally, meta->marked_for_compaction is always false. |
would it be possible to reproduce the issue in a unit test? |
@miasantreble
you will see meta_.marked_for_compaction is always false, that "(needs compaction)" never never print. |
if so can you please add a unit test for the bug? thanks |
Closing it since it was not reproduced, |
@yuwenlong123 which version of RocksDB are you running on. It appears that CompactOnDeletionCollector::Finish() stopped calling CompactOnDeletionCollector::Reset() since two years ago: #2936 . Can you try out the latest release and see whether the bug is still there? |
Because in BuildTable function, builder->Finish() will reset need_comapct_ to false before
builder->NeedCompact
assigns it tomarked_for_compaction
.