【发布时间】:2021-09-27 08:19:21
【问题描述】:
假设您有 3 个服务器 S1、S2 和 S3。 S1(领导者),将日志复制到S2 和S3,然后将日志响应应用到客户端并崩溃。所以我们有
S1 1
S2 1
S3 1
现在当S2 成为领导者(来自S3 的投票)它将如何应用日志?根据 Raft 论文
If there exists an N such that N > commitIndex, a majority
of matchIndex[i] ≥ N, and log[N].term == currentTerm:
set commitIndex = N.
在上述情况下,S2 (commitIndex = 0) 的期限为 2,而日志的期限始终为 1;因此,最后一个条件不会满足?我错过了什么吗?
【问题讨论】:
标签: replication distributed-system consensus raft