Skip to content
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

raft follower should add the judgment of leader lease valid when process askvote to prevent split brain #5379

Closed
tangyuanzhang opened this issue Mar 2, 2023 · 5 comments
Assignees
Labels
affects/none PR/issue: this bug affects none version. process/fixed Process of bug severity/none Severity of bug type/bug Type: something is unexpected
Milestone

Comments

@tangyuanzhang
Copy link
Contributor

Current code that process voting election requests may cause split brain (ep: network issue),I think it would be better to add some judgment

image

@tangyuanzhang tangyuanzhang added the type/bug Type: something is unexpected label Mar 2, 2023
@github-actions github-actions bot added affects/none PR/issue: this bug affects none version. severity/none Severity of bug labels Mar 2, 2023
@Sophie-Xie Sophie-Xie added this to the v3.5.0 milestone Mar 3, 2023
@critical27
Copy link
Contributor

Would you name one split brain case? What you implemented above is called leader stickness, which is generally used in raft, but whether check leader stickness does not impact leader election.

@tangyuanzhang
Copy link
Contributor Author

tangyuanzhang commented Mar 7, 2023

A(leader, lease 30s) ,B ,(follower) C (follower), C restart(isBlindFollower, quick election), send askvote reques to A(lost), send askvote request to B,B votes for C,now A is leader, C is leader;

@tangyuanzhang
Copy link
Contributor Author

A(leader, lease 30s) ,B ,(follower) C (follower), A rocksdb manual compaction, write stall, sendheart only step2(not send log), A and C network isolation,C can't receive heartbeat, send askvote request to B,B votes for C,now A is leader, C is leader;

@tangyuanzhang
Copy link
Contributor Author

tangyuanzhang commented Mar 9, 2023

The judgment of role and pre_vote can be removed

@critical27
Copy link
Contributor

Same as #5352, close it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects/none PR/issue: this bug affects none version. process/fixed Process of bug severity/none Severity of bug type/bug Type: something is unexpected
Projects
None yet
Development

No branches or pull requests

3 participants