-
Notifications
You must be signed in to change notification settings - Fork 741
scheduler: move hot region should be splitted if it's size is too large . #6281
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
Conversation
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
Skipping CI for Draft Pull Request. |
Signed-off-by: bufferflies <1045931706@qq.com>
bdcc9f2
to
f0f1b59
Compare
Signed-off-by: bufferflies <1045931706@qq.com>
3c5c6c1
to
9de2d19
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #6281 +/- ##
==========================================
- Coverage 75.18% 75.02% -0.16%
==========================================
Files 408 408
Lines 40532 40598 +66
==========================================
- Hits 30475 30460 -15
- Misses 7417 7488 +71
- Partials 2640 2650 +10
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 26 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
Signed-off-by: bufferflies <1045931706@qq.com>
cd85c7c
to
a94251c
Compare
Signed-off-by: bufferflies <1045931706@qq.com>
71eed8c
to
7c9ecfd
Compare
7c9ecfd
to
70fc54d
Compare
509c252
to
bd4787a
Compare
splitRegions := make([]*core.RegionInfo, 0) | ||
if bs.opTy == movePeer { | ||
for _, region := range []*core.RegionInfo{bs.cur.region, bs.cur.revertRegion} { | ||
if region == nil { | ||
continue | ||
} | ||
if region.GetApproximateSize() > bs.GetOpts().GetMaxMovableHotPeerSize() { | ||
hotSchedulerNeedSplitBeforeScheduleCounter.Inc() | ||
splitRegions = append(splitRegions, region) | ||
} | ||
} | ||
} | ||
if len(splitRegions) > 0 { | ||
return bs.createSplitOperator(splitRegions) | ||
} |
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.
Should we move it to the beginning of this function?
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.
Good suggestion.
Signed-off-by: bufferflies <1045931706@qq.com>
/merge |
@bufferflies: It seems you want to merge this PR, I will help you trigger all the tests: /run-all-tests Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
This pull request has been accepted and is ready to merge. Commit hash: 942804b
|
/cherry-pick release-7.1 |
/cherry-pick release-7.1 |
/cherry-pick-release-7.1 |
/cherry-pick release-7.1 |
3 similar comments
/cherry-pick release-7.1 |
/cherry-pick release-7.1 |
/cherry-pick release-7.1 |
@wuhuizuo: new pull request created to branch In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
…ge . (tikv#6281) * add createSplitOperator Signed-off-by: bufferflies <1045931706@qq.com> * consider string nil Signed-off-by: bufferflies <1045931706@qq.com> * add unit test for split buckets Signed-off-by: bufferflies <1045931706@qq.com> * enable split in hot region Signed-off-by: bufferflies <1045931706@qq.com> * lint Signed-off-by: bufferflies <1045931706@qq.com> * add stringer for resourceTy Signed-off-by: bufferflies <1045931706@qq.com> * remove region keys and hot split keys in additional info Signed-off-by: bufferflies <1045931706@qq.com> * pass unit test Signed-off-by: bufferflies <1045931706@qq.com> * address comments Signed-off-by: bufferflies <1045931706@qq.com> * remove one case from TestLoadKeyspaceGroupsAssignment Signed-off-by: bufferflies <1045931706@qq.com> * revert TestLoadKeyspaceGroupsAssignment Signed-off-by: bufferflies <1045931706@qq.com> --------- Signed-off-by: bufferflies <1045931706@qq.com> Co-authored-by: Ryan Leung <rleungx@gmail.com> Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
…ge . (tikv#6281) * add createSplitOperator Signed-off-by: bufferflies <1045931706@qq.com> * consider string nil Signed-off-by: bufferflies <1045931706@qq.com> * add unit test for split buckets Signed-off-by: bufferflies <1045931706@qq.com> * enable split in hot region Signed-off-by: bufferflies <1045931706@qq.com> * lint Signed-off-by: bufferflies <1045931706@qq.com> * add stringer for resourceTy Signed-off-by: bufferflies <1045931706@qq.com> * remove region keys and hot split keys in additional info Signed-off-by: bufferflies <1045931706@qq.com> * pass unit test Signed-off-by: bufferflies <1045931706@qq.com> * address comments Signed-off-by: bufferflies <1045931706@qq.com> * remove one case from TestLoadKeyspaceGroupsAssignment Signed-off-by: bufferflies <1045931706@qq.com> * revert TestLoadKeyspaceGroupsAssignment Signed-off-by: bufferflies <1045931706@qq.com> --------- Signed-off-by: bufferflies <1045931706@qq.com> Co-authored-by: Ryan Leung <rleungx@gmail.com> Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com> fix flaky key for TestLoadKeyspaceGroupsAssignment Signed-off-by: bufferflies <1045931706@qq.com>
…ge . (#6281) (#6371) ref #6281, ref #6328, ref tikv/tikv#14135, ref tikv/tikv#14214, close tikv/tikv#14333 Signed-off-by: bufferflies <1045931706@qq.com> Co-authored-by: buffer <1045931706@qq.com> Co-authored-by: Ryan Leung <rleungx@gmail.com>
What problem does this PR solve?
Issue Number: Ref #6328,Close tikv/tikv#14333, ref #tikv/tikv#14214, ref tikv/tikv#14135
What is changed and how does it work?
If the moved region's size is bigger than the
max-movable-hot-peer-size
, it will be splited by hot buckets.It will brings two benefits:
split-bucket-scheduler
The
split-bucket-scheduler
will be removed from the default listCheck List
Tests
This PR:

master:

Code changes
Side effects
Related changes
Release note