pub enum NamespacePlacement {
Unplaced,
Prefer {
nodes: BTreeSet<String>,
},
Pinned {
nodes: BTreeSet<String>,
},
}Expand description
Placement directive for a namespace, over the existing within-pool node
routing axis ((namespace, task_queue, node)).
NamespacePlacement::Unplaced remains the default and today’s behaviour.
NamespacePlacement::Prefer is a SOFT default node-label set (spill to any
worker when none of the preferred labels are live); NamespacePlacement::Pinned
is a HARD required node-label set (wait when none are live — opt-in isolation).
nodes are free-form node labels matched against a worker’s advertised
node (a locality, not a process). BTreeSet gives deterministic ordering
so the encoded form is stable. This slice (P2-P1) is storage only —
nothing reads Prefer/Pinned yet; the dispatch-time two-tier spill (P2-P3)
and admission gate (P2-I1) consult them in later slices.
Variants§
Unplaced
No placement directive — the namespace’s records scatter across shards by name-hash like all other durable state, and its activities dispatch to any live worker (today’s behaviour).
Prefer
SOFT placement: prefer workers whose advertised node is in nodes,
spilling to any live worker when none of the preferred labels are live.
Pinned
HARD placement: require a worker whose advertised node is in nodes,
waiting when none are live (opt-in tenant isolation).
Trait Implementations§
Source§impl Clone for NamespacePlacement
impl Clone for NamespacePlacement
Source§fn clone(&self) -> NamespacePlacement
fn clone(&self) -> NamespacePlacement
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more