In raft paper section 5.4.2
If a leader crashes before committing an entry, future leaders will attempt to finish replicating the entry. However, a le
If we allow entry from the previous term being committed, after (c)
, entry numbered 2
will be committed. After that, if 3
is selected as the leader, it will overwrite the committed 2
. Thus, S5
and S1
will execute different commands. To prevent that, we will not allow 2
committed. Thus, the commands that are executed in all state machines will become consistent.