-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
Fixes #9565 #9586
Fixes #9565 #9586
Conversation
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.
LGTM, thanks. See #9334 for an example of how to organize the info in the GitHub title/description. These fields form the commit message and it's preferable for the commit message to have minimal external references.
edit: One thing my example doesn't demonstrate but yours could use is a line that says "Fixes #<issue number>." so the related issue gets auto-closed upon this PR landing.
Thanks Andrew! The comments are addressed. |
@gitbw95 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
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.
Thanks for addressing the comment. LGTM again!
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.
Can we add a unit test for this? Maybe something simple like mismatched compression type between start and output level, and compaction_options_universal.allow_trivial_move
set to true. Earlier, it would have allowed the move, but should fail now.
I will add a new pr with the unit test. |
Summary:
Compaction::IsTrivialMove checks whether allow_trivial_move is set, and if so it returns the value of is_trivial_move_. The allow_trivial_move option is there for universal compaction. So when this is set and leveled compaction is enabled, then useful code that follows this block never gets a chance to run.
A check that compaction_style == kCompactionStyleUniversal should be added to avoid doing the wrong thing for leveled.
Test Plan:
To reproduce this:
First edit db/compaction/compaction.cc with
And then run
Example output with the debug code added
After this PR, the bug is fixed.