How does raft handle committing entries from previous one?

前端 未结 5 1475
渐次进展
渐次进展 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

    I think both situations in figure 8 (d) and (e) are legal in Raft because the paper says:

    To eliminate problems like the one in Figure 8, Raft never commits log entries from previous terms by counting replicas. Only log entries from the leader’s current term are committed by counting replicas.

    In figure 8(d) the entries with term 2 is not in the local log of leader S5, and they are not committed to the state machine. It is ok to overwrite them with entries with term 3. Only entries in leader's current log are eligible to be considered as committed by counting the number of replicas.

提交回复
热议问题