-
Notifications
You must be signed in to change notification settings - Fork 720
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: change merge match peers strategy #1339
Conversation
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
@Connor1996 CI failed. |
@nolouch Because |
@Connor1996 Any update? Maybe you can make sure regions have only 1 intersection. |
Signed-off-by: Connor1996 <zbk602423539@gmail.com>
Signed-off-by: Connor1996 <zbk602423539@gmail.com>
Signed-off-by: Connor1996 <zbk602423539@gmail.com>
steps = append(steps, RemovePeer{FromStore: peer.GetStoreId()}) | ||
kind |= OpRegion | ||
index++ |
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.
Please check if index == len(toAdds) after this loop.
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
Signed-off-by: Connor1996 <zbk602423539@gmail.com>
* change merge leader strategy
* change merge leader strategy
What problem does this PR solve?
There is a case that a follower is added and transfer leader to it, and the apply process of it is slow so leader regards it as a voter but actually it is still a learner. Once that, the follower can't be a leader, but the old leader can't know that so there is no leader to serve for a while.
What is changed and how it works?
change merge match peers strategy, transfer leader to the first added follower if there is no intersection store, and remove one peer after adding one peer.
Check List