-
Notifications
You must be signed in to change notification settings - Fork 312
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
cluster: support evict leaders on stop and restore on start #1789
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. |
Codecov Report
@@ Coverage Diff @@
## master #1789 +/- ##
==========================================
- Coverage 53.08% 47.18% -5.90%
==========================================
Files 303 303
Lines 34587 34829 +242
==========================================
- Hits 18358 16431 -1927
- Misses 14077 16436 +2359
+ Partials 2152 1962 -190
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
3750ec7
to
81a5e7c
Compare
81a5e7c
to
9426ea3
Compare
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 836dcda
|
What problem does this PR solve?
Close #1781
What is changed and how it works?
--evict-leaders
argument totiup-cluster stop
command, to evict store leaders from an instance and wait it to complete, ignored for non-store instances. Only use it with-N
argument to stop specific instance, if there is no place for store leaders to transfer, the operation may fail.--restore-leaders
argument totiup-cluster start
command, to delete the store leader evict scheduler of an instance, so that leaders are allowed to transfer back to it. If the instance was stopped with--evict-leaders
and started without--restore-leaders
, the instance will be up but no leader could be transferred to it, in that case, runstart
again with--restore-leaders
or usepd-ctl
to delete the store leader evict scheduler.Also comment some unused code in
pkg/cluster/task/action.go
, we're calling those functions direct inmanager
, not via a task, maybe we need to also refactor those part later to make things easier.Check List
Tests
Code changes
Side effects