pub enum StateBackendError {
Io(String),
Serialization(String),
NotFound {
vnode: u32,
epoch: u64,
},
StaleVersion {
caller: u64,
authoritative: u64,
},
SplitBrainCommit {
committer: String,
self_id: String,
},
}Expand description
Errors a StateBackend can raise.
Variants§
Io(String)
Underlying I/O failure (filesystem, object_store, network).
Serialization(String)
Serialization or framing error in the stored partial bytes.
NotFound
The partial for (vnode, epoch) is not present.
StaleVersion
The caller’s assignment version is older than the backend’s
authoritative version. Thrown by StateBackend::write_partial
when a stale writer (e.g. the losing side of a split-brain)
attempts to persist state at a version that has since been
superseded. The caller should abandon the write, refresh its
assignment snapshot, and retry at the new version.
Fields
Authoritative version seen by the backend.
SplitBrainCommit
Raised by StateBackend::epoch_complete when the caller
observes an existing commit marker whose audit body names a
different instance. Two leaders raced on the same epoch and
the other one won. The caller (losing leader) must NOT proceed
with its own sink-commit phase — its view of the state is not
the one durably sealed.
Trait Implementations§
Source§impl Debug for StateBackendError
impl Debug for StateBackendError
Source§impl Display for StateBackendError
impl Display for StateBackendError
Source§impl Error for StateBackendError
impl Error for StateBackendError
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 StateBackendError
impl RefUnwindSafe for StateBackendError
impl Send for StateBackendError
impl Sync for StateBackendError
impl Unpin for StateBackendError
impl UnsafeUnpin for StateBackendError
impl UnwindSafe for StateBackendError
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2where
T: SharedNiching<N1, N2>,
N1: Niching<T>,
N2: Niching<T>,
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2where
T: SharedNiching<N1, N2>,
N1: Niching<T>,
N2: Niching<T>,
§impl<T> Pointee for T
impl<T> Pointee for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> Scope for T
impl<T> Scope for T
§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.