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

RaftActor doesn't accept RequestVote(lastLogIndex < log.lastLogIndex, lastLogTerm > log.lastLogTerm, ...) #125

Closed
xirc opened this issue Feb 7, 2022 · 0 comments · Fixed by #126

Comments

@xirc
Copy link
Contributor

xirc commented Feb 7, 2022

From the Raft thesis (https://github.com/ongardie/dissertation) section 3.6.1 (Election Restriction),
RaftActor should accept RequestVote(lastLogIndex < log.lastLogIndex, lastLogTerm > log.lastLogTerm).

The following is expected:

* RequestVote.lastLogTerm < log.lastLogTerm: deny
* RequestVote.lastLogTerm > log.lastLogTerm:
  * RequestVote.lastLogIndex > log.lastLogIndex: accept
  * RequestVote.lastLogIndex = log.lastLogIndex: accept
  * RequestVote.lastLogIndex < log.lastLogIndex: accept
* RequestVote.lastLogTerm = log.lastLogTerm:
  * RequestVote.lastLogIndex > log.lastLogIndex: accept
  * RequestVote.lastLogIndex = log.lastLogIndex: accept
  * RequestVote.lastLogIndex < log.lastLogIndex: deny

The current implementations are the following:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant