#[non_exhaustive]pub enum ProposeError {
NotLeader {
leader_hint: NodeId,
},
NoLeader,
Shutdown,
DriverDead,
Busy,
Fatal {
reason: &'static str,
},
}Expand description
Errors propose / add_peer / remove_peer can return.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NotLeader
We were a follower with a known leader; redirect there.
NoLeader
We were a follower or candidate with no known leader. The caller should retry on a sensible cadence; the cluster may still be electing.
Shutdown
The runtime is shutting down.
DriverDead
The driver task died. Likely a bug or a fatal Storage /
StateMachine error.
Busy
The driver’s in-flight proposal queue is full
(Config::max_pending_proposals reached). Backpressure
signal: retry later, or adjust the limit upward if your
workload’s concurrency is legitimately that high.
Fatal
A non-recoverable error hit the runtime: a Storage write
failed, the state machine couldn’t decode a committed
command (corrupt log), or similar. The driver has shut
itself down after failing every in-flight proposal with
this error — the caller’s next call will see Shutdown or
DriverDead.
Trait Implementations§
Source§impl Debug for ProposeError
impl Debug for ProposeError
Source§impl Display for ProposeError
impl Display for ProposeError
Source§impl Error for ProposeError
impl Error for ProposeError
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()