Skip to content

Commit

Permalink
Updating state machine documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
andreev-io committed Dec 18, 2021
1 parent b1c56e4 commit 9a2f45e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions little_raft/src/state_machine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ use std::fmt::Debug;
pub enum TransitionState {
/// Queued transitions have been received from the user but have not been
/// processed yet. They are in the queue.
///
Queued,

/// Committed transitions have not yet been applied to the state machine but
Expand All @@ -22,10 +21,12 @@ pub enum TransitionState {
Abandoned(TransitionAbandonedReason),
}

/// TransitionAbandonedReason explains why a particular transition has been
/// abandoned by the replica.
#[derive(Clone, Debug, PartialEq)]
pub enum TransitionAbandonedReason {
// NotLeader transitions have been abandoned because the replica is not
// the cluster leader.
/// NotLeader transitions have been abandoned because the replica is not the
/// cluster leader.
NotLeader,
}

Expand Down
2 changes: 1 addition & 1 deletion little_raft/src/timer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ impl Timer {

rx
}
}
}

0 comments on commit 9a2f45e

Please sign in to comment.