-
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
schedule: add some operator steps related to joint consensus #2895
Conversation
peer := region.GetStoreVoter(pl.ToStore) | ||
if peer == nil || peer.Id != pl.PeerID || | ||
(peer.Role != metapb.PeerRole_IncomingVoter && peer.Role != metapb.PeerRole_Voter) { | ||
return 0 |
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.
What about adding a log here?
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.
This function will be executed repeatedly, and no error occurs here. What information needs to be logged here?
server/schedule/operator/step.go
Outdated
(notInJointState && count != 0) || | ||
(inJointState && count != len(cpe.PromoteLearners)+len(cpe.DemoteVoters)) { | ||
// change is not atomic, or there are other peers in the joint state | ||
return errors.New("unexpected peer role") |
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.
better to add more detail, or we cannot know which condition fail
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.
Different error messages have been returned for different situations. PTAL
Signed-off-by: Zheng Xiangsheng <[email protected]>
865bd14
to
16c8095
Compare
Signed-off-by: Zheng Xiangsheng <[email protected]>
Signed-off-by: Zheng Xiangsheng <[email protected]>
Signed-off-by: Zheng Xiangsheng <[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.
LGTM
/merge |
/run-all-tests |
@HunDunDM merge failed. |
/run-integration-lightning-test |
* schedule: add some operator steps related to joint consensus Signed-off-by: Zheng Xiangsheng <[email protected]> * refine errors Signed-off-by: Zheng Xiangsheng <[email protected]> * rename Signed-off-by: Zheng Xiangsheng <[email protected]> * address comment Signed-off-by: Zheng Xiangsheng <[email protected]> Co-authored-by: ti-srebot <[email protected]> Signed-off-by: Zheng Xiangsheng <[email protected]> # Conflicts: # server/schedule/operator_controller.go
Signed-off-by: Zheng Xiangsheng [email protected]
What problem does this PR solve?
This is a child PR of #2886
For details, please refer to #2860
What is changed and how it works?
DemoteFollower
ChangePeerV2Enter
andChangePeerVLeave
with a sub-stepDemoteVoter
ConfVerChanged
frombool
touint64
ConfVerChanged
behavior ofRemovePeer
:PeerID
is specified, ifPeerID
is changed, it is also regarded asConfVerChanged = 1
Check List
Tests
Release note