pub enum ProtocolError {
ConfigChangePending {
last_config_index: LogIndex,
commit_index: LogIndex,
},
LeaderNoopUncommitted {
noop_index: LogIndex,
commit_index: LogIndex,
},
LearnerNotCaughtUp {
node: NodeId,
match_index: LogIndex,
required: LogIndex,
},
AlreadyVoter {
node: NodeId,
},
NotLearner {
node: NodeId,
},
NotMember {
node: NodeId,
},
LastVoterRemoval {
node: NodeId,
},
TooManyUncommitted {
uncommitted: usize,
limit: usize,
},
}Expand description
A protocol-level rejection with the deciding values named.
The request was well formed but the protocol rules forbid it in the current state. Every variant names the values that decided the rejection (invariant E-01, docs/ARCHITECTURE.md section 13).
Variants§
ConfigChangePending
A configuration change was proposed while an earlier one is still uncommitted (invariant M-01).
Fields
LeaderNoopUncommitted
A configuration change was proposed before the leader’s
current-term NoOp entry committed (invariant M-02).
Fields
LearnerNotCaughtUp
A learner was proposed for promotion before it had replicated through the leader’s commit index (invariant M-04).
Fields
AlreadyVoter
An AddLearner or PromoteVoter named a node that is already
a voter.
NotLearner
A PromoteVoter named a node that is not a learner.
NotMember
A change named a node that is not a member in either role.
LastVoterRemoval
A RemoveVoter named the last remaining voter; a cluster may
shrink to one voter, never to none.
TooManyUncommitted
A client proposal arrived while the leader’s uncommitted tail
already held Config::max_uncommitted_entries entries.
Trait Implementations§
Source§impl Clone for ProtocolError
impl Clone for ProtocolError
Source§impl Debug for ProtocolError
impl Debug for ProtocolError
Source§impl Display for ProtocolError
impl Display for ProtocolError
impl Eq for ProtocolError
Source§impl Error for ProtocolError
impl Error for ProtocolError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()