pub enum RepError {
Show 24 variants
NotMaster {
master: Option<String>,
},
NotReplica,
GroupNotFound(String),
NodeNotFound(String),
ElectionFailed(String),
InsufficientAcks {
needed: u32,
received: u32,
},
ConsistencyTimeout(Duration),
ReplicaLagExceeded {
lag_ms: u64,
limit_ms: u64,
},
RollbackRequired {
from: i64,
to: i64,
},
NetworkError(String),
FrameCorrupted {
vlsn: u64,
expected: u32,
actual: u32,
},
ProtocolError(String),
StateError(String),
DatabaseError(String),
ConfigError(String),
ShutdownInProgress,
InvalidStateTransition(String),
NodeAlreadyExists(String),
ChannelClosed(String),
ServiceNotFound(String),
SubscriptionError(String),
NetworkRestoreError(String),
EnvironmentClosed,
InvalidState(String),
}Expand description
Errors that can occur during replication operations.
Variants§
NotMaster
The node is not the master. Thrown when a write operation is attempted on a replica node.
NotReplica
The node is not a replica. Thrown when a replica-only operation is attempted on the master.
GroupNotFound(String)
The replication group does not exist. (group aspect).
NodeNotFound(String)
A node was not found in the replication group.
ElectionFailed(String)
An election failed to produce a master.
InsufficientAcks
Insufficient replica acknowledgments for a commit.
Fields
ConsistencyTimeout(Duration)
A replica consistency policy timed out.
ReplicaLagExceeded
The replica’s replication lag exceeds the configured limit.
RollbackRequired
A hard rollback is required on the replica.
NetworkError(String)
A network-level error occurred.
FrameCorrupted
A replication frame failed CRC32 verification.
Indicates in-flight corruption (hardware error, kernel bug, or an adversarial sender). The receiver closes the channel when this occurs.
ProtocolError(String)
A replication protocol error occurred (unexpected message, version mismatch, etc.).
StateError(String)
The node is in an invalid state for the requested operation.
DatabaseError(String)
An underlying database error occurred.
ConfigError(String)
A configuration error was detected.
ShutdownInProgress
The node is shutting down and cannot accept new operations.
InvalidStateTransition(String)
Invalid state transition attempted.
NodeAlreadyExists(String)
A node with the same name already exists in the group.
ChannelClosed(String)
A network channel has been closed.
ServiceNotFound(String)
A requested service was not found.
SubscriptionError(String)
A subscription error occurred.
NetworkRestoreError(String)
A network restore error occurred.
EnvironmentClosed
The environment has been closed.
InvalidState(String)
The node is in an invalid state.
Trait Implementations§
Source§impl Error for RepError
impl Error for RepError
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()
Auto Trait Implementations§
impl Freeze for RepError
impl RefUnwindSafe for RepError
impl Send for RepError
impl Sync for RepError
impl Unpin for RepError
impl UnsafeUnpin for RepError
impl UnwindSafe for RepError
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more