4

In paxos algorithm,there is a description in wiki:

Phase 2a: Accept Request

If a Proposer receives enough promises from a Quorum of Acceptors, it needs to set a value to its proposal. If any Acceptors had previously accepted any proposal, then they'll have sent their values to the Proposer, who now must set the value of its proposal to the value associated with the highest proposal number reported by the Acceptors. If none of the Acceptors had accepted a proposal up to this point, then the Proposer may choose any value for its proposal.[17] The Proposer sends an Accept Request message to a Quorum of Acceptors with the chosen value for its proposal.

Let's say the proposer sends out Propose(4) to five acceptors and receives back Ack(abc, 2), Ack(abc, 2), and Ack(xyz, 3) it must send Accept(xyz, 4).

My question is :

  1. If the proposer last must send Accept(xyz,4), then when the proposer use its own value to send accept request eg. Accept(qwe,n)?

  2. What does the acceptor which sends Ack(xyz,3) do when it sees the new accept and why?

Thanks

simbo1905
  • 6,321
  • 5
  • 58
  • 86
  • 1
    Typically an example is not enough to get your question across, because it is ambiguous (you intentionally leave out information to keep it a simple example). Your question would be way clearer if you would start with a general explanation of what you want and clarify that with an example. – Vincent van der Weele Feb 19 '14 at 08:31
  • Thanks,i have reworded it – user1957040 Feb 19 '14 at 12:58
  • 1
    Question should be reopened as now clear. An accepter will store committed values which the application needs to store (clearly you agreeing values you want to remember but thats not part of the algorithm). To run the algorithm a follower only needs to store the highest promise it made and the highest uncommitted accept it acked. When it sees a commit of a higher or equal numbered value than the last accept it acked it knows the last acked is either committed or dead so can wipe it. when a leader next proposes it wont send a dead value or committed value; only a high value not yet committed. – simbo1905 Oct 29 '14 at 06:56
  • My last comment answered question 2. The answer to question one follows from my first answer; you only get left with uncommitted values during a leader failover. The new leader does not attempt to cobber/overwrite the old leaders uncommitted value lest the old leader comes back onto the network issuing racing commits of a different value. Once the new leader has committed the old leaders uncommitted work it then starts to lead its own values and as long as the system stays stable it will successfully propose/accept/commit only its own values for clients which see it as leader until failover. – simbo1905 Oct 29 '14 at 07:05
  • 1
    From my point of view, I think this question is very clear and I also have this question in my mind. – Gary Gauh Mar 21 '16 at 03:06
  • This answer describes what is going on very well http://stackoverflow.com/a/16136744/329496 – simbo1905 Mar 15 '17 at 19:26

0 Answers0