-
Notifications
You must be signed in to change notification settings - Fork 728
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
scheduler: unify leaderSolver and peerSolver in hot read scheduler #3925
Conversation
Signed-off-by: lhy1024 <[email protected]>
[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. |
Signed-off-by: lhy1024 <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #3925 +/- ##
==========================================
- Coverage 74.71% 74.64% -0.07%
==========================================
Files 246 246
Lines 25117 25131 +14
==========================================
- Hits 18767 18760 -7
- Misses 4695 4717 +22
+ Partials 1655 1654 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
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.
rest lgtm
server/schedulers/hot_region.go
Outdated
} | ||
if len(leaderOps) == 0 && peerSolver.addPendingInfluence() { |
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.
Previously, we prefer to balance by the leader. In this PR, it changes?
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.
yes, this pr will compared them and then selected
Signed-off-by: lhy1024 <[email protected]>
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.
rest lgtm
Signed-off-by: lhy1024 <[email protected]>
Signed-off-by: lhy1024 <[email protected]>
Signed-off-by: lhy1024 <[email protected]>
@@ -393,15 +419,15 @@ func (h *hotScheduler) balanceHotWriteRegions(cluster opt.Cluster) []*operator.O | |||
case s < int(schedulePeerPr*100): | |||
peerSolver := newBalanceSolver(h, cluster, write, movePeer) | |||
ops := peerSolver.solve() | |||
if len(ops) > 0 { | |||
if len(ops) > 0 && peerSolver.tryAddPendingInfluence() { |
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.
Perhaps, we also need to do a comparison for write. The rest LGTM.
Signed-off-by: lhy1024 <[email protected]>
Signed-off-by: lhy1024 <[email protected]>
Signed-off-by: lhy1024 <[email protected]>
/merge |
@lhy1024: 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: 657e9a6
|
Signed-off-by: lhy1024 [email protected]
What problem does this PR solve?
Previously, we gave priority to the transfer leader and only used the move leader when there was no transfer leader, which is not necessarily the optimal solution, so this pr will be compared uniformly and then selected
What is changed and how it works?
Check List
Tests
Release note