pub enum RangeWriteReject {
NoRange {
collection: CollectionId,
},
NotOwner {
collection: CollectionId,
range_id: RangeId,
role: RangeRole,
owner: NodeIdentity,
},
StaleEpoch {
collection: CollectionId,
range_id: RangeId,
expected: OwnershipEpoch,
current: OwnershipEpoch,
},
}Expand description
Why an ownership-aware public write was rejected (issue #990).
This is a routing/ownership error, deliberately distinct from the
instance-wide read-only rejection raised by
WriteGate: a replica/non-holder
rejecting a public write is not “this node is read-only”, it is “this node is
not the authority for this range — route to the owner”. Crucially, none of
these rejections fall back to the privileged internal replica-apply path; a
public write that is not for this node’s owned range never reaches storage.
Variants§
NoRange
No range of the collection covers the routed key, so the write cannot be placed. The caller must (re)resolve routing against a fresher catalog.
Fields
collection: CollectionIdNotOwner
This node holds the range but is not its owner (a Replica), or holds
no copy at all (NoCopy). Either way a public write must be routed to
owner, never applied locally.
StaleEpoch
This node is the range owner, but the write was authorised under an ownership epoch that no longer matches the catalog — a write fenced out because ownership has since moved (its epoch advanced). Carries both epochs so the caller can see how far the routing decision was behind.
Trait Implementations§
Source§impl Clone for RangeWriteReject
impl Clone for RangeWriteReject
Source§fn clone(&self) -> RangeWriteReject
fn clone(&self) -> RangeWriteReject
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 RangeWriteReject
impl Debug for RangeWriteReject
Source§impl Display for RangeWriteReject
impl Display for RangeWriteReject
impl Eq for RangeWriteReject
Source§impl Error for RangeWriteReject
impl Error for RangeWriteReject
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 PartialEq for RangeWriteReject
impl PartialEq for RangeWriteReject
Source§fn eq(&self, other: &RangeWriteReject) -> bool
fn eq(&self, other: &RangeWriteReject) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for RangeWriteReject
Auto Trait Implementations§
impl Freeze for RangeWriteReject
impl RefUnwindSafe for RangeWriteReject
impl Send for RangeWriteReject
impl Sync for RangeWriteReject
impl Unpin for RangeWriteReject
impl UnsafeUnpin for RangeWriteReject
impl UnwindSafe for RangeWriteReject
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