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

Fix candidate step down on heartbeat #1663

Merged
merged 2 commits into from
Feb 20, 2015
Merged

Fix candidate step down on heartbeat #1663

merged 2 commits into from
Feb 20, 2015

Conversation

benbjohnson
Copy link
Contributor

This PR also includes some internal testing set up. Ignore that. The step down fix is here: a7a8e0b

@@ -1386,7 +1386,7 @@ func (l *Log) RequestVote(term, candidateID, lastLogIndex, lastLogTerm uint64) (
return ErrAlreadyVoted
} else if lastLogTerm < l.lastLogTerm {
return ErrOutOfDateLog
} else if lastLogTerm == l.term && lastLogIndex < l.lastLogIndex {
} else if lastLogTerm == l.lastLogTerm && lastLogIndex < l.lastLogIndex {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This another bug fix?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, yes, i thought that was in a previous PR.

@otoolep
Copy link
Contributor

otoolep commented Feb 20, 2015

One other question about a change, but I believe I understand why the heartbeat stepdown change works.

+1

benbjohnson added a commit that referenced this pull request Feb 20, 2015
Fix candidate step down on heartbeat
@benbjohnson benbjohnson merged commit 2a66893 into master Feb 20, 2015
@benbjohnson benbjohnson deleted the raft branch February 20, 2015 21:42
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 this pull request may close these issues.

None yet

2 participants