How does raft handle committing entries from previous one?

前端 未结 5 1487
渐次进展
渐次进展 2021-02-08 22:59

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

5条回答
  •  花落未央
    2021-02-08 23:18

    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.

提交回复
热议问题