uses table id in compaction prioritization#4142
Merged
keith-turner merged 2 commits intoapache:elasticityfrom Jan 9, 2024
Merged
uses table id in compaction prioritization#4142keith-turner merged 2 commits intoapache:elasticityfrom
keith-turner merged 2 commits intoapache:elasticityfrom
Conversation
Makes the default compaction planner use the table id when prioritizing compactions. The root table id is always given the highest priority, followed by the metadata table, then user tables. Fixes apache#4033
ddanielr
reviewed
Jan 9, 2024
| compactingFiles); | ||
|
|
||
| int prio = totalFiles + compactingFiles; | ||
| // This holds the two bits used to encode the priority of the table. |
Contributor
There was a problem hiding this comment.
Does the work in #4133 change anything with this compaction priority calculation?
Contributor
Author
There was a problem hiding this comment.
Yeah it could. We could add the table id from that work into this calculation once its merged
Contributor
Author
ddanielr
approved these changes
Jan 9, 2024
ddanielr
approved these changes
Jan 9, 2024
Contributor
ddanielr
left a comment
There was a problem hiding this comment.
I like this change as it's very quick to understand the range calculation and ranges can have different amounts instead of the available range being equally divided across all tables.
I also think this is easier for users to pick up and modify for their own custom compaction service.
keith-turner
added a commit
that referenced
this pull request
Jan 10, 2024
In #4142 a refactoring was done and an unused variable was left over from that. This commit removes the unused variable.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Makes the default compaction planner use the table id when prioritizing compactions. The root table id is always given the highest priority, followed by the metadata table, then user tables.
Fixes #4033