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: Clarify conditions for granting votes and prevotes. #9204

Merged
merged 1 commit into from
Jan 23, 2018

Conversation

bdarnell
Copy link
Contributor

This includes one theoretical logic change: A node that knows the
leader of the current term will no longer grant votes, even if it has
not yet voted in this term. It also adds a m.Type == MsgPreVote
guard on the m.Term > r.Term check, which was previously thought to
be incorrect (see #8517) but was actually just unclear.

Closes #8517
Closes #8571

This includes one theoretical logic change: A node that knows the
leader of the current term will no longer grant votes, even if it has
not yet voted in this term. It also adds a `m.Type == MsgPreVote`
guard on the `m.Term > r.Term` check, which was previously thought to
be incorrect (see etcd-io#8517) but was actually just unclear.

Closes etcd-io#8517
Closes etcd-io#8571
@xiang90
Copy link
Contributor

xiang90 commented Jan 23, 2018

lgtm. thanks.

@xiang90 xiang90 merged commit 2e85b6c into etcd-io:master Jan 23, 2018
bdarnell added a commit to bdarnell/cockroach that referenced this pull request Jan 28, 2018
This picks up some changes to prevote (etcd-io/etcd#8525 and
etcd-io/etcd#9204), as well as a new ErrProposalDropped that we're not
yet using.

Release note: None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants