1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//! Distributed request routing — the gRPC-edge availability layer over the
//! epoch fence (DISTRIBUTED-ROUTING-DESIGN §2).
//!
//! A node that is not the current owner of `shard_for(workflow_id)` cannot win
//! the quorum CAS for that workflow's writes: the owner's promised ballot fences
//! the proposal (surfaced as [`aion_store::StoreError::NotOwner`], R-0). Routing
//! turns that correctness backstop into an *availability* layer: at the edge we
//! resolve the shard owner and either proceed locally, forward to the owner
//! (R-3), or return the typed retryable `NotOwner` so the caller re-resolves.
//!
//! This module only ever does anything for a distributed (`[store.cluster]`)
//! boot. With no cluster store on
//! [`crate::ServerState`] every entry point short-circuits to "proceed locally",
//! so the default single-node path is byte-identical — the fence is never even
//! reachable there.
//!
//! ## Staging
//!
//! - **R-1 (here):** a `shard_for`-aware edge guard for signal/query/cancel on a
//! non-owned shard (return `NotOwner`), plus an unsteered-start remint so a
//! `start` whose default-minted id would land off-owner is re-minted onto a
//! locally-owned shard and never fences (§2.4 stopgap).
//! - **R-2:** a `ShardDirectory` trait + static resolver so the edge knows the
//! *remote* owner's gRPC address, not just "not me".
//! - **R-3:** a `RequestForwarder` trait + gRPC forwarder that relays a non-local
//! request to the owner instead of rejecting it.
pub use ;
pub use ;
pub use ;
pub use ;