pub enum ReplicationError {
HigherTerm(u64),
QuorumNotReached,
NodeUnreachable {
node_id: u32,
},
RpcTimeout {
duration: u64,
},
NoPeerFound {
leader_id: u32,
},
LogConflict {
index: u64,
expected_term: u64,
actual_term: u64,
},
NotLeader {
leader_id: Option<u32>,
},
}
Variants§
HigherTerm(u64)
Stale leader detected during AppendEntries RPC
QuorumNotReached
Failed to achieve majority acknowledgment
NodeUnreachable
Target follower node unreachable
RpcTimeout
Network timeout during replication RPC
NoPeerFound
Missing peer configuration in leader state
LogConflict
Log inconsistency detected during replication (§5.3)
NotLeader
Node not in leader state for replication requests
Trait Implementations§
Source§impl Debug for ReplicationError
impl Debug for ReplicationError
Source§impl Display for ReplicationError
impl Display for ReplicationError
Source§impl Error for ReplicationError
impl Error for ReplicationError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<ReplicationError> for ConsensusError
impl From<ReplicationError> for ConsensusError
Source§fn from(source: ReplicationError) -> Self
fn from(source: ReplicationError) -> Self
Converts to this type from the input type.
Source§impl From<ReplicationError> for Error
impl From<ReplicationError> for Error
Source§fn from(e: ReplicationError) -> Self
fn from(e: ReplicationError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ReplicationError
impl RefUnwindSafe for ReplicationError
impl Send for ReplicationError
impl Sync for ReplicationError
impl Unpin for ReplicationError
impl UnwindSafe for ReplicationError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request