File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,22 @@ impl PersistentStateLedger {
3838 /// number.
3939 ///
4040 /// Panics if the ledger cannot be saved.
41+ ///
42+ /// The trust quorum protocol relies on persisting state to disk, such
43+ /// as whether a node has prepared or committed a configuration, before
44+ /// responding to a coordinator node or Nexus. This is necessary in order
45+ /// to ensure that enough nodes actually have performed an operation and
46+ /// not have the overall state of the protocol go backward in the case of
47+ /// a crash and restart of a node. In this manner, trust quorum is similar
48+ /// to consensus protocols like Raft and Paxos.
49+ ///
50+ /// If for any reason we cannot persist trust quorum state to the ledger,
51+ /// we must panic to ensure that the node does not take any further
52+ /// action incorrectly, like acknowledging a `Prepare` to a coordinator.
53+ /// Panicking is the simplest mechanism to ensure that a given node will
54+ /// not violate the invariants of the trust quorum protocol in the case
55+ /// of internal disk failures. It also ensures a very obvious failure that
56+ /// will allow support to get involved and replace internal disks.
4157 pub async fn save (
4258 log : & Logger ,
4359 paths : Vec < Utf8PathBuf > ,
You can’t perform that action at this time.
0 commit comments