diff --git a/little_raft/src/replica.rs b/little_raft/src/replica.rs index aa36bdd..8a4ef9d 100644 --- a/little_raft/src/replica.rs +++ b/little_raft/src/replica.rs @@ -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); diff --git a/little_raft/src/state_machine.rs b/little_raft/src/state_machine.rs index da185dd..3064353 100644 --- a/little_raft/src/state_machine.rs +++ b/little_raft/src/state_machine.rs @@ -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