-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
fix apply outdate membership change #4107
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
critical27
requested review from
kikimo,
liwenhui-soul,
liuyu85cn and
pengweisong
April 1, 2022 03:27
liwenhui-soul
previously approved these changes
Apr 1, 2022
pengweisong
approved these changes
Apr 6, 2022
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
liwenhui-soul
approved these changes
Apr 6, 2022
Sophie-Xie
added a commit
that referenced
this pull request
Apr 7, 2022
* fix apply outdate membership change * fix transfer leader to '':0 cause crash Co-authored-by: Sophie <[email protected]>
yixinglu
pushed a commit
that referenced
this pull request
Apr 7, 2022
* fix apply outdate membership change (#4107) * fix apply outdate membership change * fix transfer leader to '':0 cause crash Co-authored-by: Sophie <[email protected]> * add code for part peers backward compatible (#4101) * add code for part peers backward compatible * add balance keys * fix bug: pass tests * add gflag && ignore * change int to int64_t * chage to emplace Co-authored-by: panda-sheep <[email protected]> Co-authored-by: Sophie <[email protected]> * fixed (#4116) Co-authored-by: Sophie <[email protected]> * move KW_CLEAR to unresolved keyword (#4118) * Limits for add and recover balance data or zone balance jobs (#4104) * If there are failed or stopped data balance or zone balance job, must firstly recover it * address wenhaocs's comments * address comments * add more comments * recover job * add more ut * adjust comment format * adjust comment format * adjust comment format Co-authored-by: Doodle <[email protected]> Co-authored-by: pengwei.song <[email protected]> Co-authored-by: panda-sheep <[email protected]> Co-authored-by: haifei.zhao <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
What problem(s) does this PR solve?
Issue(s) number:
Description:
Introduced in #3846, my bad. The key point is that, whenever we start-up a partition, we use the peers in meta, which is a snapshot of state machine by applying all previous membership changes. So after we start-up, we should not apply any membership change before we started.
Here is a example:
However, this is not a silver bullet, the membership change need to be re-considered totally after this version.
BTW:
Fix crash when trying to transfer leader to a empty host ("":0)
How do you solve it?
Do not apply any membership change before a part started.
Special notes for your reviewer, ex. impact of this fix, design document, etc:
Checklist:
Tests:
Affects:
Release notes:
Please confirm whether to be reflected in release notes and how to describe:
Introduced in the same version, not related