gpt4 book ai didi

algorithm - Paxos算法中的 "value of the highest-numbered proposal"是什么?

转载 作者:塔克拉玛干 更新时间:2023-11-03 02:55:50 26 4
gpt4 key购买 nike

Paxos made simple 中,Lamport 将算法的阶段 2 (a) 描述如下:

If the proposer receives a response to its prepare requests (numbered n) from a majority of acceptors, then it sends an accept request to each of those acceptors for a proposal numbered n with a value v, where v is the value of the highest-numbered proposal among the responses, or is any value if the responses reported no proposals.

  • 这是否意味着提议者可以在收集到大多数接受者的响应后立即发送接受请求,而不管他们的提议编号如何? (我发现引用中强调的部分暗示了这一点,因为所有编号相同的提案都应该具有相同的值(value),对吧?)
  • 或者提议者是否需要来自大多数接受者的具有相同提议编号的响应? (这意味着编号为 m(小于 n)的答复不计入编号为 n 的答复的多数)

最佳答案

Does this mean that a proposer can send an accept request as soon as he has gathered an response from a majority of the acceptors regardless of their proposal numbers? (I find the emphasized part of the quote to imply so, because all equally-numbered proposals should have the same value, right?)

是的,提议者可以在收集到大多数接受者的响应后立即发送接受请求。返回的提议编号告诉提议者在接受请求中发送哪个值。

如果没有返回提议编号,提议者可以自由选择自己的值。但是,如果返回任何提案编号,提案者必须发送与最高提案编号关联的值。

这是一个例子。假设提议者向五个接受者发送 Propose(4) 并接收回 Ack(abc, 2), Ack(abc, 2) , 并且Ack(xyz, 3)必须发送Accept(xyz, 4)

关于algorithm - Paxos算法中的 "value of the highest-numbered proposal"是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19837318/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com