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

Learner should respond to request vote but don't accept votes #57

Closed
BusyJay opened this issue May 9, 2018 · 1 comment
Closed

Learner should respond to request vote but don't accept votes #57

BusyJay opened this issue May 9, 2018 · 1 comment
Assignees
Labels
Bug Recognized misbehavior. learner Anything related to learner mechanism.

Comments

@BusyJay
Copy link
Member

BusyJay commented May 9, 2018

Consider following case, a cluster has three nodes A, B, C, and A is Leader. And then add learner D, E to the cluster. D, E is promoted to voter then, but D is isolated from A, so D doesn't know himself is promoted. When A, B both crash, the cluster still has three voters C, D, E, which should be able to form a quorum. However, D can't vote in the current implementation, since it doesn't know it's not learner anymore.

One solution to this problem is let learner respond to vote request and let candidate check if the response is from a valid peer. Because we won't let a voter step back as learner, so when candidate consider a node is a voter, then it's definitely a voter from that point to infinite future. So the candidate check should be safe. In the situation described above, the quorum can be formed again, and the cluster can recover automatically.

/cc @xiang90 @siddontang any thoughts?

@BusyJay BusyJay added Bug Recognized misbehavior. learner Anything related to learner mechanism. labels May 9, 2018
@siddontang
Copy link
Contributor

PTAL @xiang90 @Hoverbear

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Recognized misbehavior. learner Anything related to learner mechanism.
Projects
None yet
Development

No branches or pull requests

3 participants