pub enum TransitionRejection {
UnknownRange {
collection: CollectionId,
range_id: RangeId,
},
OwnerMismatch {
collection: CollectionId,
range_id: RangeId,
expected: NodeIdentity,
current: NodeIdentity,
},
StaleEpoch {
collection: CollectionId,
range_id: RangeId,
expected: OwnershipEpoch,
current: OwnershipEpoch,
},
StaleCatalogVersion {
collection: CollectionId,
range_id: RangeId,
expected: CatalogVersion,
current: CatalogVersion,
},
InvalidCandidate {
collection: CollectionId,
range_id: RangeId,
candidate: NodeIdentity,
reason: InvalidCandidateReason,
},
MissingSafetyEvidence {
collection: CollectionId,
range_id: RangeId,
candidate: NodeIdentity,
},
EvidenceForWrongCandidate {
collection: CollectionId,
range_id: RangeId,
target: NodeIdentity,
evidence_for: NodeIdentity,
},
SafetyCheckFailed {
collection: CollectionId,
range_id: RangeId,
candidate: NodeIdentity,
watermark: CommitWatermark,
applied_term: u64,
applied_lsn: u64,
},
}Expand description
Why an ownership transition was refused. Every variant leaves the catalog untouched — transitions fail closed.
Variants§
UnknownRange
No range with this (collection, range_id) exists in the catalog.
OwnerMismatch
The request’s expected current owner does not match the catalog. The planner is working from a stale view of who owns the range.
StaleEpoch
The request’s expected ownership epoch does not match the catalog — authority has already moved since the planner read it.
StaleCatalogVersion
The request’s expected catalog version does not match the catalog — the entry has been edited since the planner read it (CAS failure).
InvalidCandidate
The target candidate is not eligible to take ownership.
MissingSafetyEvidence
No safety evidence was supplied for the candidate, so the safety gate cannot be evaluated — fail closed.
EvidenceForWrongCandidate
Safety evidence was supplied but describes a different node than the target — it cannot vouch for the candidate being promoted.
SafetyCheckFailed
The candidate’s applied log does not cover the range commit watermark — promoting it could lose committed writes, so the transition is refused.
Trait Implementations§
Source§impl Clone for TransitionRejection
impl Clone for TransitionRejection
Source§fn clone(&self) -> TransitionRejection
fn clone(&self) -> TransitionRejection
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TransitionRejection
impl Debug for TransitionRejection
Source§impl Display for TransitionRejection
impl Display for TransitionRejection
impl Eq for TransitionRejection
Source§impl Error for TransitionRejection
impl Error for TransitionRejection
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()
Source§impl From<TransitionRejection> for TransitionError
impl From<TransitionRejection> for TransitionError
Source§fn from(value: TransitionRejection) -> TransitionError
fn from(value: TransitionRejection) -> TransitionError
Source§impl PartialEq for TransitionRejection
impl PartialEq for TransitionRejection
Source§fn eq(&self, other: &TransitionRejection) -> bool
fn eq(&self, other: &TransitionRejection) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for TransitionRejection
Auto Trait Implementations§
impl Freeze for TransitionRejection
impl RefUnwindSafe for TransitionRejection
impl Send for TransitionRejection
impl Sync for TransitionRejection
impl Unpin for TransitionRejection
impl UnsafeUnpin for TransitionRejection
impl UnwindSafe for TransitionRejection
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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> 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 moreSource§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>
T in a tonic::Request