-
Notifications
You must be signed in to change notification settings - Fork 8
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
Task AB#1310794: [LevelDB] Add option to disable seek compaction #4
Conversation
db/version_set.cc
Outdated
f->allowed_seeks--; | ||
if (f->allowed_seeks <= 0 && file_to_compact_ == nullptr) { | ||
file_to_compact_ = f; | ||
file_to_compact_level_ = stats.seek_file_level; | ||
return true; | ||
if (!vset_->options_->disable_seek_autocompaction) { |
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.
Just wondering if this line shouldn't be inside the if as well, in the Apply
function we will not set the allowed seeks anymore so doesn't seem like we should be decrementing them as well.
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.
That's a good point, thanks for catching this! I agree with your assessment and will move the decrementing of allowed_seeks
inside the if block.
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.
Approved for DoD pending completion of Author's checklist
) * adding option to disable seek compaction * Fixing failed test: convention is to have bools as uint8_t * addressing feedback: inconsistency between spaces and tabs * addressing feedback: moving allowed_seeks decrement --------- Co-authored-by: Mike Biddlecombe <mike.biddlecombe@blackbirdinteractive.com>
https://dev-mc.visualstudio.com/Minecraft/_workitems/edit/1310794
Moved over the option to disable auto-compaction based on number of seeks. This is based on the two commits in leveldb-mcpe:
Second commit is a clean-up to get unit tests to pass.