Enum Action
pub enum Action {
Send {
to: ReplicaId,
msg: Msg,
},
Persist {
entries: Vec<Entry>,
},
Replace {
after: Op,
entries: Vec<Entry>,
},
Committed {
commit: Op,
},
SaveView {
view: u64,
last_normal: u64,
commit: Op,
},
Role {
primary: bool,
view: u64,
},
SaveMembership {
membership: Membership,
},
}Variants§
Send
Persist
Append these entries to the local log, in order, right after the
current last op; then report durability with Replica::on_durable.
Replace
Atomically replace everything after after with entries (which
start at after + 1). Until the replacement is durable the old log
must remain intact; a crash leaves one or the other, never a mix.
Used when a view change installs a new log and for protocol-aware
repair (where committed entries are rewritten unchanged).
Committed
Entries through commit are committed.
SaveView
Persist durably before sending anything that follows. A barrier:
every earlier Persist and Replace must be durable first, because
last_normal vouches for the log it was saved with.
Role
This replica became primary (resume workflows) or backup (stop them).
SaveMembership
Persist this membership durably before anything that follows: from here on the replica acts in its epoch (or, not a member, retires).
Fields
membership: Membership