In this case, num_last appears to be sufficient:
- the 'last' message is only sent in response to a collect,
- a 'collect' is only sent once for a given value of pn,
- a 'last' message with a mismatched pn is ignored or triggers a new collect round,
- and the messenger layer provides exactly-once delivery.
That said, num_last could be replaced with a set<int> to harden the code a bit.
sage
On Tue, Jan 19, 2021 at 5:57 AM Afonso Fernandes <afonsofernandes@xxxxxxxxxx> wrote:
Hello,
I am studying the ceph paxos implementation.
In handle_last, the leader counts the replies to collect phase by incrementing the variable num_last and without checking if the reply is duplicated (however, in handle_accept, the leader keeps a set of peons that replied, in variable accepted).
Why does the leader not keep a set of peons that replied in the collect phase, similar to what it does later in function handle_accept?
Thanks,
Afonso
_______________________________________________
Dev mailing list -- dev@xxxxxxx
To unsubscribe send an email to dev-leave@xxxxxxx
_______________________________________________ Dev mailing list -- dev@xxxxxxx To unsubscribe send an email to dev-leave@xxxxxxx