-
Notifications
You must be signed in to change notification settings - Fork 452
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
Relax race condition between subkey compaction thread #1335
Conversation
… Compaction Related issue:apache#1298 Test Plan: all unittest passed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you elaborate a bit how you fix this race condition logically? Generally, "wait for a while" is not logically correct but best effort.
Hi @tisonkun , this race is triggered by modifying the expire time of a key while compacting. Rare in real-world but indeed a race. In my view, since it is hard and expensive to add locking to both compacting and command executing, waiting is the currently best way to avoid the race. |
Thank you. Then let's update the PR title as "Relax ..." instead of "Fix ...". |
Thanks all, merging... |
Thanks for your contribution again @dongdongwcpp |
lazy delete to best effort relax race condition between command
Expire
and subkey Compaction.It closes #1298.