这种场景下raft是怎么处理log的呢?
How does raft deal with log in this scenario?
假设d在上图中被选为leader,它会如何处理索引为11和12的日志。我认为应该删除这两条日志,但我没有找到任何线索关于如何处理上述场景日志的 raft 论文。
如果 (d) 被选为领导者,那么它将把它的日志复制给追随者,它不会删除索引 11 和 12 处的项目。请参阅 raft paper 中关于日志复制的第 5.3 节,其中它说
In Raft, the leader handles inconsistencies by forcing the followers’
logs to duplicate its own. This means that conflicting entries in
follower logs will be overwritten with entries from the leader’s log.
有关领导者选举的规则确保这是一个安全的决定。
假设d在上图中被选为leader,它会如何处理索引为11和12的日志。我认为应该删除这两条日志,但我没有找到任何线索关于如何处理上述场景日志的 raft 论文。
如果 (d) 被选为领导者,那么它将把它的日志复制给追随者,它不会删除索引 11 和 12 处的项目。请参阅 raft paper 中关于日志复制的第 5.3 节,其中它说
In Raft, the leader handles inconsistencies by forcing the followers’ logs to duplicate its own. This means that conflicting entries in follower logs will be overwritten with entries from the leader’s log.
有关领导者选举的规则确保这是一个安全的决定。