-
Notifications
You must be signed in to change notification settings - Fork 735
scheduler: fix the recovery time of slow store #9388
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
Skipping CI for Draft Pull Request. |
Signed-off-by: Ryan Leung <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #9388 +/- ##
==========================================
+ Coverage 76.10% 76.15% +0.05%
==========================================
Files 478 478
Lines 74707 74682 -25
==========================================
+ Hits 56853 56875 +22
+ Misses 14316 14280 -36
+ Partials 3538 3527 -11 🚀 New features to boost your workflow:
|
/cc @LykxSassinator |
@rleungx: GitHub didn't allow me to request PR reviews from the following users: LykxSassinator. Note that only tikv members and repo collaborators can review this PR, and authors cannot review their own PRs. 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 kubernetes-sigs/prow repository. |
@LykxSassinator: adding LGTM is restricted to approvers and reviewers in OWNERS files. 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 kubernetes-sigs/prow repository. |
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
@@ -299,10 +315,23 @@ func (s *evictSlowStoreScheduler) Schedule(cluster sche.SchedulerCluster, _ bool | |||
// slow node next time. | |||
log.Info("slow store has been removed", | |||
zap.Uint64("store-id", store.GetID())) | |||
} else if store.GetSlowScore() <= slowStoreRecoverThreshold && s.conf.readyForRecovery() { | |||
} else if store.GetSlowScore() <= slowStoreRecoverThreshold { |
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 this better?
} else if store.GetSlowScore() <= slowStoreRecoverThreshold { | |
} else { | |
s.conf.tryUpdateRecoverStatus(true) | |
if store.GetSlowScore() <= slowStoreRecoverThreshold { | |
... | |
} else { | |
... | |
} | |
} |
Signed-off-by: Ryan Leung <[email protected]>
Signed-off-by: Ryan Leung <[email protected]>
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: LykxSassinator, okJiang, overvenus The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What problem does this PR solve?
Issue Number: Close #9384
What is changed and how does it work?
Check List
Tests
Previously, it would balance the leader immediately if the slow score recovers. Now it will wait for the recovery time before rebalancing.
Release note