pub enum WorkerSelection {
PreferTiers(Vec<Option<String>>),
Required(BTreeSet<String>),
}Expand description
How an UNPINNED outbox row (row.node == None) must be dispatched given its
namespace’s NamespacePlacement — the SINGLE decision shared by BOTH the
gRPC (WorkerOutboxDispatch) and liminal
(RegistryLiminalDispatch) dispatch
paths, so the two transports can never diverge on Prefer (spill) vs Pinned
(require + wait, NEVER spill) semantics.
This is consulted ONLY for an unpinned row: an authored Some(N) pin is
authoritative and never enters this path. The result is a pure
worker-SELECTION input; it never mutates the recorded row’s node (the
determinism invariant, CP-Phase-2 §2.4).
Variants§
PreferTiers(Vec<Option<String>>)
Unplaced/Prefer: try the ordered tiers (each preferred label, then the
None spill), stopping at the first tier with a live worker. Unplaced
collapses to the single None any-worker tier.
Required(BTreeSet<String>)
Pinned{L}: require a worker whose advertised node ∈ L, and WAIT when
none is live — NEVER a None spill to an any-node worker (CP-Phase-2 §2.5,
P2-I1). An empty required set can never be satisfied by any labelled worker,
so it stalls until the namespace’s placement is relaxed — the correct
“isolation > availability” behaviour of a hard pin with no admissible node.
Trait Implementations§
Source§impl Clone for WorkerSelection
impl Clone for WorkerSelection
Source§fn clone(&self) -> WorkerSelection
fn clone(&self) -> WorkerSelection
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 WorkerSelection
impl Debug for WorkerSelection
impl Eq for WorkerSelection
Source§impl PartialEq for WorkerSelection
impl PartialEq for WorkerSelection
impl StructuralPartialEq for WorkerSelection
Auto Trait Implementations§
impl Freeze for WorkerSelection
impl RefUnwindSafe for WorkerSelection
impl Send for WorkerSelection
impl Sync for WorkerSelection
impl Unpin for WorkerSelection
impl UnsafeUnpin for WorkerSelection
impl UnwindSafe for WorkerSelection
Blanket Implementations§
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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§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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> 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