-
Notifications
You must be signed in to change notification settings - Fork 590
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
feat(storage): emergency picker for write_limit #12183
Conversation
src/meta/src/hummock/compaction/picker/compaction_task_validator.rs
Outdated
Show resolved
Hide resolved
src/meta/src/hummock/manager/mod.rs
Outdated
@@ -887,7 +886,7 @@ impl HummockManager { | |||
.sum::<usize>(), | |||
start_time.elapsed() | |||
); | |||
} else if is_trivial_move && can_trivial_move { |
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.
Is it because all trivial move tasks are TaskType::Dynamic
that we can remove this check?
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.
IMO, we don't actually need to disable trivial-move, regardless of the type of task?
…nto li0k/storage_picker_for_write_limit
…nto li0k/storage_picker_for_write_limit
…nto li0k/storage_picker_for_write_limit
…nto li0k/storage_picker_for_write_limit
@@ -616,6 +617,50 @@ pub fn default_level_selector() -> Box<dyn LevelSelector> { | |||
Box::<DynamicLevelSelector>::default() | |||
} | |||
|
|||
#[derive(Default)] | |||
pub struct EmergencySelector {} |
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.
Please move to an independent file, this file is enough large....
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.
ok, I'm going to separate the implementation of the different selectors in a separate pr and put it in a independent file, like the picker
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.
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.
Please help to clarify whether removal of can_trivial_move
is OK. @Little-Wallace
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.
But I still think it is not safety to select task without thinking of score of each level. I think this PR may bring some risk
I will add it back |
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.
Discussed offline: it is better to add a switch in risectl (maybe in compaction group config) control whether the emergency picker can be used.
…nto li0k/storage_picker_for_write_limit
nexmark test q20 with 64 sub_level count limit with 128 sub_level count limit |
…nto li0k/storage_picker_for_write_limit
Codecov Report
@@ Coverage Diff @@
## main #12183 +/- ##
==========================================
- Coverage 69.79% 69.76% -0.03%
==========================================
Files 1423 1424 +1
Lines 236196 236247 +51
==========================================
- Hits 164859 164828 -31
- Misses 71337 71419 +82
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 5 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
This pr introduces a new emergency picker and enables it when the write limit is triggered. Simple logic to avoid live locking problems with write limits.
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.