Behaviour of candidate receiving RequestVote with higher term

42 views
Skip to first unread message

M Keyer

unread,
Dec 6, 2022, 2:36:44 PM12/6/22
to raft-dev

Hello,

How will a node in candidate state for term=10 behave, if it receives a RequestVote for term=11 from another candidate node?

This case is not mentioned in section "Candidates (§5.2)" in box "Rules for Servers" in figure 2 of the paper "In Search of an Understandable Consensus Algorithm (Extended Version)", so I guess the candidate node will just ignore the RequestVote? 

Jesper Lindholm

unread,
Dec 6, 2022, 2:49:00 PM12/6/22
to raft...@googlegroups.com
In the thesis, §3.3, it is mentioned that any vote request (or indeed any request or response) with a higher term than currently known received by any node should result in them converting to a follower and adopting that term. Any candidate has already voted for themselves that term and can't vote for someone else. But the node with the higher term probably has a good chance of being elected next term if their log is up to date. 

I recommend using the thesis instead of the paper. 

/Jesper

6 dec. 2022 kl. 20:37 skrev 'M Keyer' via raft-dev <raft...@googlegroups.com>:



Hello,

How will a node in candidate state for term=10 behave, if it receives a RequestVote for term=11 from another candidate node?

This case is not mentioned in section "Candidates (§5.2)" in box "Rules for Servers" in figure 2 of the paper "In Search of an Understandable Consensus Algorithm (Extended Version)", so I guess the candidate node will just ignore the RequestVote? 

--
You received this message because you are subscribed to the Google Groups "raft-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to raft-dev+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/raft-dev/4a3fd894-ced1-4653-8d6e-f15141754949n%40googlegroups.com.

Free Ekanayaka

unread,
Dec 7, 2022, 4:27:50 AM12/7/22
to Jesper Lindholm, raft...@googlegroups.com
Jesper Lindholm <Jesper....@treetop.se> writes:

> Any candidate has already voted for themselves that term and can't vote for someone else.

It can still vote for the other node I believe? IOW, the candidate has
voted for itself in term 10, but after converting to follower and
bumping its term to 11 it can vote for the other node I think.

Jesper Lindholm

unread,
Dec 7, 2022, 4:42:14 AM12/7/22
to Free Ekanayaka, raft...@googlegroups.com
Aha! Correct - sorry I missed that.

/Jesper

> 7 dec. 2022 kl. 10:27 skrev Free Ekanayaka <free.ek...@gmail.com>:
Reply all
Reply to author
Forward
0 new messages