pub type Carried<V> = SynodMsg<Command<V>>;Expand description
What the Synod protocol beneath carries for this layer.
Aliased Type§
pub enum Carried<V> {
P1a {
ballot: Ballot,
},
P1b {
ballot: Ballot,
accepted: Vec<Pvalue<Command<V>>>,
collected: u64,
},
P2a {
pvalue: Pvalue<Command<V>>,
},
P2b {
ballot: Ballot,
slot: u64,
},
Decision {
slot: u64,
command: Command<V>,
},
CatchUp {
from_slot: u64,
},
Applied {
slot_out: u64,
},
Propose {
slot: u64,
command: Command<V>,
},
}Variants§
P1a
⟨p1a, λ, b⟩ — phase one, from a scout.
P1b
⟨p1b, α, ballot_num, accepted⟩ — an acceptor’s answer, carrying one pvalue per slot it
has accepted for rather than everything it has ever accepted. §4.1; see the module
documentation. This message is what grew fastest in the book’s version, because it grew with
the ballots the run had seen as well as with the slots.
P2a
⟨p2a, λ, ⟨b, s, c⟩⟩ — phase two, from a commander.
P2b
⟨p2b, α, ballot_num⟩, plus the slot it answers for. Figure 4 has no slot, because the
reply goes to a thread whose identity supplies it; a leader holding its commanders as fields
needs it in the message. See the module documentation.
Decision
⟨decision, s, c⟩ — Figure 6(a)’s last line, sent by a commander that has counted a
majority, so that every process learns what was chosen rather than only the one that
counted.
Also the answer to a SynodMsg::Propose for a slot already decided, sent to the asker
alone. A decision is announced once and its commander then exits, so a process the
announcement never reached has no other way back; asking is the way, and this is the answer.
CatchUp
A request for the decisions from from_slot onwards, from a process that has fallen behind
and whose consensus layer has collected them. §4.2’s replica-to-replica transfer; see
Cmd::CatchUp.
Applied
⟨applied, ρ, s⟩ — how far the replica on the sending machine has applied. Not on any
figure; §4.2’s periodic update, which is what makes collection possible at all.
Propose
A proposal for a slot, from a replica on this machine or from a leader that could not act on it. Not on any figure — §4.4’s colocation; see the module documentation.
A Propose that arrived is never forwarded again. Two processes whose detectors
disagree would otherwise pass one back and forth for as long as they disagree.