0

If an raft node has voted for some candidate ,then crash before it could persistent the vote info, will the server has re-vote ability after restart?

wang
  • 53
  • 5
  • If i were the author, i would persist the vote info first before sending the vote. In the worse case when the candidate does not receive enough votes (due to many crashes), just start the election again. But need to double check the paper for sure – Khanh TO Jul 25 '20 at 14:19

1 Answers1

1

The way this should work is to persist the vote first before sending the vote.

In the worst case when the candidate does not receive enough votes (due to many crashes right after persisting or the vote is lost when being sent over the network), just start the election again.

Please note the highlighted text from raft paper: https://raft.github.io/raft.pdf

enter image description here

This could be confirmed by https://raft.github.io/ visualization:

enter image description here

enter image description here

Khanh TO
  • 48,509
  • 13
  • 99
  • 115