Hi,I was thinking about the effect of not remembering votedFor for the raft leader election. The leader election is essentially phase 1 of Paxos which establishes a unique term number (a ballot or what I call a monotonic generation-clock pattern) which can then be used to propose values. Establishing a unique term by voting needs the last promised term to be stored and persisted on each node. I see that votedFor essentially makes the requestVote idempotent for a candidate. But worst case, if votedFor is not stored, the candidate won't be able to retry the requestVote requests and will need to restart the election (after a random wait). That way, storing votedFor only helps with progress (by not needing a suitable candidate to unnecessarily restart election), but it does not affect safety in any way.Is it fair to say that votedFor is essentially stored to make leader elections progress faster in case a candidate needs to retry the requestVote messages?Thanks,Unmesh
--
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/CAOk%2Bzfd%3D4m5sdeUQ0yTiGaXqq-66JhvkLiE0K1jYPfmTXd9n-Q%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/raft-dev/CAFdgvPHj0f92qnrP2uMsVV97b4di1aQkuUPb6ox7hsBOKVaUGw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/raft-dev/CAOk%2Bzfepbzxm63itUYC1rozDpiOdVAptAUFy0XoQAvV4WwOjRQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/raft-dev/2BD08C0F-744A-4271-8B2E-10F9D1F2BFF1%40treetop.se.
16 sep. 2022 kl. 20:24 skrev Jesper Lindholm <Jesper....@treetop.se>:
Allowing a node to vote for two different candidates during the same term absolutely affects safety. The guarantees of safety are based on a few “properties”, one of which is the promise and assumption that any one node will only ever vote for one candidate during a given term. For more information, see the Raft paper.
16 sep. 2022 kl. 20:29 skrev Unmesh Joshi <unmes...@gmail.com>:
To view this discussion on the web visit https://groups.google.com/d/msgid/raft-dev/CAOk%2BzffhHTwC%3Dutd6pwGx5DyYneuQ-t8Vs1Toa61viYZ9xFUCA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/raft-dev/2BD08C0F-744A-4271-8B2E-10F9D1F2BFF1%40treetop.se.
To view this discussion on the web visit https://groups.google.com/d/msgid/raft-dev/969B0680-2AC5-4F7D-AF39-9F115EA8B55A%40treetop.se.