Expand description
Short-TTL per-namespace placement cache for the dispatcher (Control-Plane Phase 2, P2-P3). Short-TTL in-process cache of per-namespace placement directives, read by the non-replayed outbox dispatcher (Control-Plane Phase 2, P2-P3).
The dispatcher consults a namespace’s [NamespacePlacement] on every claimed
row to decide preferred-vs-spill worker selection. Reading it straight from
the durable [NamespaceStore] each sweep would be a per-row quorum read on the
hot claim loop. This cache front-runs get_namespace, holding each
namespace’s placement for a short TTL so the steady-state path is a lock +
map-lookup, never a store round-trip.
Staleness is benign for the Prefer soft-spill this slice ships: a stale entry
only mis-prefers a worker for at most one TTL window — it self-corrects on
the next refresh and never affects correctness or replay (placement is a
dispatch-time selection input, never written to the recorded row). The TTL is
deliberately short so an operator’s PUT /placement takes effect promptly.
Structs§
- Placement
Cache - A short-TTL cache over
NamespaceStore::get_namespace’s placement field.
Enums§
- Worker
Selection - How an UNPINNED outbox row (
row.node == None) must be dispatched given its namespace’sNamespacePlacement— the SINGLE decision consulted byWorkerOutboxDispatch, which since #52 R4 selects for BOTH transports, soPrefer(spill) versusPinned(require and wait, NEVER spill) is decided once for every row, whatever the chosen worker is delivered over.
Functions§
- preferred_
node_ order - The ordered node-filter tiers an UNPINNED row consults for the
Prefer{L}two-tier spill (Control-Plane Phase 2, P2-P3) — the SINGLE source of the prefer-then-spill sequence consulted byWorkerOutboxDispatch, which since #52 R4 selects for BOTH transports — so “prefer labelled worker, spill to any” cannot mean two things, because only one walk derives it. - worker_
selection_ for - Resolve the
WorkerSelectionfor an unpinned row from its namespace placement. The single seam that keepsPrefer(soft spill) andPinned(hard require + wait) identical across the gRPC and liminal transports.