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

Check that candidate's log is up to date during election #1

Open
amidvidy opened this issue May 15, 2013 · 0 comments
Open

Check that candidate's log is up to date during election #1

amidvidy opened this issue May 15, 2013 · 0 comments

Comments

@amidvidy
Copy link
Owner

When granting a vote,we are currently missing the check to see if the candidate's log is
at least as up-to-date as the voter's log. The following condition must be met
in order to grant a vote:
req.lastLogTerm > voter.lastLogTerm ||
(req.lastLogTerm == voter.lastLogTerm &&
req.lastLogIndex >= voter.lastLogIndex)

Thanks to Diego for pointing this out.

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

No branches or pull requests

1 participant