Observing consensus in HW3

Observing consensus in HW3

by Milan Duric -
Number of replies: 5

Dear,

The handout says that observing a consensus is equivalent to observing a threshold of PaxosAcceptMessages. However, it also says that we should not process PaxosAcceptMessages if the peer is in Paxos phase 1. Thus, only the peer that reaches paxos phase 2 will be able to observe a consensus by the means of threshold of PaxosAcceptMessages. In order to reach paxos phase 2, the peer needs to gain a threshold of PaxosPromiseMessages. However, PaxosPromiseMessages are effectively unicasted (because they are embedded inside private messages, with only recipient being the source of paxos propose message). Therefore, only the peer that calls Tag will end up in phase 2 and observe the consensus. Is this the intended behavior?

If it is, then I don't see how we can ever reach a threshold of TLC messages. For example, if we had 3 nodes, one of them could call tag, observe consensus and broadcast a TLC message. Each node would then have 1 TLC message which is smaller than the threshold.

Thanks for the help.

In reply to Milan Duric

Re: Observing consensus in HW3

by Haoqian Zhang -
Only the proposer gathers the threshold of PaxosPromiseMessages and then the proposer will broadcast PaxosProposeMessages so that every acceptor enters phase 2.

Hope it helps.
In reply to Haoqian Zhang

Re: Observing consensus in HW3

by Eduardo Filipe Ferreira Da Cruz -
What about the threshold of TLC messages? As Milan stated "if we had 3 nodes, one of them could call tag, observe consensus and broadcast a TLC message. Each node would then have 1 TLC message which is smaller than the threshold." I don't see neither how we can ever reach a threshold of TLC messages.

Thanks in advance.
In reply to Eduardo Filipe Ferreira Da Cruz

Re: Observing consensus in HW3

by Haoqian Zhang -
“In our case, a peer broadcasts a TLC message in two cases:
1. When a consensus is reached at the Paxos layer, or
2. When a peer receives a quorum of TLC messages for the current clock. Note that the peer must broadcast a TLC message only once per clock.”
In reply to Haoqian Zhang

Re: Observing consensus in HW3

by Marc Fabien Egli -
Hello,

I'm not sure I understand how non-proposer nodes should act.
In a scenario with only 2 nodes (A and B) where A wants to Tag a file with a unique name. A will broadcast prepare messages to all other nodes. Then, all nodes respond with a private message containing a Promise message to A. A then enters phase 2 of paxos and will then broadcast a propose message to all nodes when it receives enough promises. How should B know that it has to enter phase 2 ? Is it because it received a single propose message ? Furthermore, how does B know that a proposer entered phase 2 ?

Marc
In reply to Marc Fabien Egli

Re: Observing consensus in HW3

by Yuchen Qian -
There is no need to keep track of the state of current phase on acceptors. It
is possible for B to receive a prepare message from a new proposer even when
it has already accepted a value.

If you take a look at the spec under "PaxosPromiseMessage":
"Furthermore, if the acceptor has already accepted a value (in Paxos phase 2),
the message's AcceptedId and AcceptedValue fields will contain the accepted
value and corresponding ID."

We only need to keep track of the step and the MaxID.