Skip to content

Commit

Permalink
Rename
Browse files Browse the repository at this point in the history
  • Loading branch information
suzaku authored and andreev-io committed Dec 21, 2021
1 parent 9afadd9 commit 20976ce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion little_raft/src/replica.rs
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ where
for i in entry.index..self.log.len() {
state_machine.register_transition_state(
self.log[i].transition.get_id(),
TransitionState::Abandoned(TransitionAbandonedReason::ConflictingEntry)
TransitionState::Abandoned(TransitionAbandonedReason::ConflictWithLeader)
);
}
self.log.truncate(entry.index);
Expand Down
6 changes: 3 additions & 3 deletions little_raft/src/state_machine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ pub enum TransitionAbandonedReason {
// the cluster leader.
NotLeader,

// ConflictingEntry entry logs in followers that are inconsistent with the
// leader's.
ConflictingEntry,
// ConflictWithLeader uncommitted transitions are abandoned because they
// don't match the consensus achieved by the majority of the cluster.
ConflictWithLeader,
}

/// StateMachineTransition describes a user-defined transition that can be
Expand Down

0 comments on commit 20976ce

Please sign in to comment.