-
Notifications
You must be signed in to change notification settings - Fork 727
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
server/schedule: use ChangePeerV2 to demote single voter directly #4445
Conversation
[REVIEW NOTIFICATION] This pull request has not been approved. 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. |
ref tikv#4444. Signed-off-by: p4tr1ck <patricknicholas@foxmail.com>
984da8a
to
c21656e
Compare
This is part of work tikv/pd#4445. Signed-off-by: p4tr1ck <patricknicholas@foxmail.com>
In addition to this PR, please also help me to review : pingcap/kvproto#839. |
This is part of work tikv/pd#4445. Signed-off-by: p4tr1ck patricknicholas@foxmail.com
This is part of work tikv/pd#4445. Signed-off-by: p4tr1ck patricknicholas@foxmail.com
Signed-off-by: p4tr1ck <patricknicholas@foxmail.com>
Codecov Report
@@ Coverage Diff @@
## master #4445 +/- ##
==========================================
+ Coverage 74.78% 74.82% +0.03%
==========================================
Files 264 264
Lines 27789 27798 +9
==========================================
+ Hits 20783 20799 +16
- Misses 5140 5145 +5
+ Partials 1866 1854 -12
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
/test |
f1c899b
to
e9f4179
Compare
Signed-off-by: p4tr1ck <patricknicholas@foxmail.com>
/run-all-tests |
Since |
We need a new way of implementation. |
/hold |
ptal @HunDunDM |
@@ -409,6 +409,20 @@ func (df DemoteFollower) CheckInProgress(cluster opt.Cluster, region *core.Regio | |||
// Influence calculates the store difference that current step makes. | |||
func (df DemoteFollower) Influence(opInfluence OpInfluence, region *core.RegionInfo) {} | |||
|
|||
// GetRequest get the ChangePeerV2 request | |||
func (df DemoteFollower) GetRequest() *pdpb.ChangePeerV2 { |
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.
how about add unit test?
What problem does this PR solve?
ref #4444.
ref tikv/tikv#11463.
What is changed and how it works?
Change the field
ChangePeer
toChangePeerV2
if demoting a voter directlry. This can avoid breaking compatibility.Check List
Tests
Related changes
Release note