pub enum RouteDecision {
Local {
range_id: RangeId,
epoch: OwnershipEpoch,
},
Forward {
hint: RoutingHint,
},
Redirect {
hint: RoutingHint,
reason: RedirectReason,
},
Unroutable {
collection: CollectionId,
},
}Expand description
What a data member decides to do with a request under any-node routing.
Variants§
Local
The local node owns the range — execute locally. Carries the range and the
current ownership epoch the write should be stamped/fenced with (the same
epoch admit_public_write
will check).
Forward
A safe point op the local node may forward internally to the owner named in the hint. The forwarded write still passes the owner’s public-write gate at the owner’s current epoch, so forwarding never bypasses fencing.
Fields
hint: RoutingHintRedirect
The request is not eligible for hidden forwarding (unsafe class, oversized payload, or forwarding disabled). Return the hint so the client refreshes topology and retries against the owner. This is the stale/misrouted response of acceptance criterion #2.
Unroutable
No range of the collection covers the key. The catalog the request resolved against is empty or stale for this collection; the client must refresh its catalog and retry — there is no owner to name yet.
Fields
collection: CollectionIdImplementations§
Source§impl RouteDecision
impl RouteDecision
Trait Implementations§
Source§impl Clone for RouteDecision
impl Clone for RouteDecision
Source§fn clone(&self) -> RouteDecision
fn clone(&self) -> RouteDecision
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 RouteDecision
impl Debug for RouteDecision
impl Eq for RouteDecision
Source§impl PartialEq for RouteDecision
impl PartialEq for RouteDecision
Source§fn eq(&self, other: &RouteDecision) -> bool
fn eq(&self, other: &RouteDecision) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for RouteDecision
Auto Trait Implementations§
impl Freeze for RouteDecision
impl RefUnwindSafe for RouteDecision
impl Send for RouteDecision
impl Sync for RouteDecision
impl Unpin for RouteDecision
impl UnsafeUnpin for RouteDecision
impl UnwindSafe for RouteDecision
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