Paxos phase 2a 消息丢失

Paxos phase 2a message loss

下图是基本Paxos的消息流,在阶段2a中,Leader为其proposal1选择值Vn,并向每个acceptor发送Accept!(1,Vn)。我的问题是:如果这三个消息中的两个丢失了怎么办?我的意思是只有 Acceptor 1(不是多数)收到 Accept!(1,Vn)。 Acceptor 1 会接受这个请求吗?然后广播给每个学习者?这个值是选的?

提议者将无法获得足够数量(读取:法定人数)的接受响应,因此整轮失败。

Paxos 可以容忍重复的消息,因此如果提议者没有得到多数响应,它可以安全且最佳地重新发送准备或接受消息。假设有一个短暂的网络问题,以至于只有那些消息丢失了。如果响应超时,然后重新发送消息,则消息将通过,并且回合可以成功。这比由于丢失消息而失败并开始新一轮更有效。

Edit 我应该注意,正如@Rakis 在评论中指出的那样,我实际上是在谈论 Paxos 的实际应用,而不是算法的学术描述,旨在证明方法的正确性。如果一个人正在参加关于该主题的考试,请坚持学术描述。如果您实际上正在编写 an implementation,那么超时并重新发送是有效处理由于瞬时消息丢失而丢失消息的方法。

Edit 答案 "the round is failed" 意味着有一个超时,可以通过开始新一轮来根据该事实采取行动。论文Paxos Made Simple. So if one wants to stick to the academic description of the algorithm then the exact answer to message loss is "nothing happens as the world stops". Note that the paper says it makes no claim to things happening in a timely manner only that no incorrect outcome can occur. Clearly no reasonable implementation will just do nothing; it should timeout and do something. This highlights the fact that the academic description of the algorithm is only for a proof of correctness; it deliberately leaves out practical considerations of how to actually build an actual solution using the algorithm. The paper hints that you can add things like negative responses to help build a pragmatic implementation without effecting correctness. So pragmatic solutions like trex return negative acknowledgments 中实际上没有提到超时,以使用该算法加速故障转移恢复。那么没有得到回应与得到否定回应是不一样的;因此,如果消息丢失,则该回合不会失败,但结果不确定。可以安全地发送更多消息(重新发送)以确定实际结果。