-
Notifications
You must be signed in to change notification settings - Fork 591
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(storage): fix the trivial-move loop caused by config and pick_whole_level #17721
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
self.config.max_l0_compact_level_count as usize, | ||
self.config | ||
.max_l0_compact_level_count | ||
.unwrap_or(compaction_config::max_l0_compact_level_count()) as usize, |
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.
reminder: compaction_config::max_l0_compact_level_count()
makes sense only because it's not configurable in toml config file. Otherwise we should use the value from config file rather than the static default one.
Was the omission of max_l0_compact_level_count from the config file unintentional?
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.
Its not omission, we change the setting of max_l0_compact_level_count
to Option
and the default value is None
(So it's invisible.)
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.
I mean it's not included here
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
…le_level (#17721) (#17723) Co-authored-by: Li0k <[email protected]>
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
Previously, we stored
max_l0_compact_level_count
as a config in CompactionConfig, and the default value will change to 0 after upgrading the old cluster.And
max_l0_compact_level_count = 0
would cause the task to be passed over by the validator, which triggered a bug in thepick_whole_level
function.pick_whole_level
picks out the tasks that contain only one sublevel, which triggers the in-place trivial-move, and the meta gets bogged down.This PR
max_l0_compact_level_count
pick_whole_level
Checklist
./risedev check
(or alias,./risedev c
)Documentation
Release note
If this PR includes changes that directly affect users or other significant modifications relevant to the community, kindly draft a release note to provide a concise summary of these changes. Please prioritize highlighting the impact these changes will have on users.