pub enum Cmd<C> {
Propose {
slot: Slot,
command: C,
},
Applied {
slot_out: Slot,
},
CatchUp {
from_slot: Slot,
},
Teach {
to: NodeId,
slot: Slot,
command: C,
},
}Expand description
Requests from the layer above.
Variants§
Propose
⟨propose, s, c⟩ — propose command for slot.
Applied
How far the replica on this machine has applied — §4.2’s “each replica periodically updates
leaders and acceptors about its slot out variable”.
A command rather than a message, because §4.4 puts the replica on this machine: it tells its own leader and acceptor by a call, and this layer is what tells everybody else’s.
CatchUp
Ask a peer that is ahead for the decisions from from_slot onwards.
§4.2’s other half: “replicas can learn decisions, and the application state that results from those decisions, from one another”. Once a slot is collected this layer cannot answer for it, and a replica that missed it has nowhere else to ask.
Teach
Answer a peer’s catch-up with one decision the replica above still holds.
The decision comes from the replica’s store, not this layer’s: this layer collected it, which is what provoked the request.