-
Notifications
You must be signed in to change notification settings - Fork 598
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(meta): reduce time complexity of MinOverlappingPicker #14036
Conversation
Signed-off-by: Little-Wallace <[email protected]>
level_handlers, | ||
stats, | ||
) { | ||
return Some(input); |
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.
If there is always some SST that can be trivial-moved, will early-return here be a problem?
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.
It is still right. Because Trivial Move task always has the smallest score(which is zero). So MinOverlappingPicker
will still return the SST that can be trivial-moved at first.
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
Signed-off-by: Little-Wallace <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #14036 +/- ##
==========================================
- Coverage 68.07% 67.98% -0.09%
==========================================
Files 1542 1542
Lines 266904 266914 +10
==========================================
- Hits 181682 181462 -220
- Misses 85222 85452 +230
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Signed-off-by: Little-Wallace <[email protected]>
…14043) Signed-off-by: Little-Wallace <[email protected]> Co-authored-by: Wallace <[email protected]>
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
close #10109
When there are too many small files in base level, meta-node may cost too much time to pick one task. Because the time complexity of
MinOverlappingPicker
is O(N^2*k), where k represent the overlap size of next level.But most of case could be solved by trivial move, so we can pick trivial move file at the beginning of picker. The time complexity of
TrivialMovePicker
is O(N*logN).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.