#[non_exhaustive]pub enum MeshError {
HistoricalRangeUnavailable {
origin: u64,
requested: Range<SeqNum>,
available: Vec<Range<SeqNum>>,
},
LineageMaxDepthExceeded {
origin: u64,
depth: u32,
},
LineageCycleDetected {
origin: u64,
cycle: Vec<u64>,
},
JoinMemoryExceeded {
strategy: String,
threshold_bytes: u64,
},
QueryBudgetExceeded {
metric: BudgetMetric,
used: u64,
limit: u64,
},
PartialResult {
rows: Vec<ResultRow>,
continuation: Vec<u8>,
reason: String,
},
PlannerError {
detail: String,
},
ExecutorError {
node: u64,
detail: String,
},
NoCapableHolder {
origin: u64,
requirement: String,
},
AmbiguousDiscovery {
matches: Vec<u64>,
requirement: String,
},
QueryCancelled,
}Expand description
Typed errors for MeshDB. Returned by both the planner
(PlannerError, NoCapableHolder, LineageMaxDepthExceeded)
and the executor (HistoricalRangeUnavailable,
JoinMemoryExceeded, QueryBudgetExceeded,
PartialResult, ExecutorError, QueryCancelled).
#[non_exhaustive] so phases B–F can add variants
(StreamingTimeout, WatermarkExpired, etc.) without
breaking source-side users.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
No node holds the requested seq range. The available
list carries the per-replica seq-range hints so
callers can negotiate a different window.
LineageMaxDepthExceeded
Lineage walk hit the depth bound before terminating. Carry the depth so callers can decide whether to retry with a wider bound.
LineageCycleDetected
Lineage walk observed a cycle in the fork-of: graph.
In principle the graph is a DAG; cycles indicate
broken upstream applications. The cycle path is
included for debugging.
Fields
JoinMemoryExceeded
A join’s working-set memory exceeded the planner’s configured threshold. Carry the strategy + threshold so dashboards can disambiguate “broadcast was too big” from “hash-partition shuffle was too big”.
Fields
QueryBudgetExceeded
The query exceeded one of its per-channel budgets
(query_max_rows, query_max_duration,
query_max_bytes_scanned). Returns the metric + the
observed-vs-limit pair.
Fields
metric: BudgetMetricWhich budget hit the limit.
PartialResult
Query terminated early but produced usable rows.
Carry the rows + a continuation token so the caller
can resume. The reason field is a short human-
readable diagnostic.
Fields
PlannerError
Planner-side failure — unsupported operator, malformed
AST, version mismatch. Distinct from ExecutorError
so dashboards can split “couldn’t plan” from
“ran but failed mid-execution”.
ExecutorError
Executor-side failure on a specific node. Carry the node_id so operators can route the report at the right peer.
NoCapableHolder
ChainRef::Discovered resolved to zero candidates.
Carry the requirement (in human-readable form) so
callers can adjust their predicate.
Fields
AmbiguousDiscovery
ChainRef::Discovered matched more than one origin.
Until Phase B’s fan-out lands, the planner refuses
rather than silently truncating to the first match.
Callers should tighten their predicate or, once Phase
B ships, switch to a multi-origin union query.
Fields
QueryCancelled
Query cancelled via MeshQueryExecutor::cancel.
Distinct from ExecutorError so callers can route
cancellations differently (they’re not failures).
Implementations§
Source§impl MeshError
impl MeshError
Sourcepub fn kind(&self) -> &'static str
pub fn kind(&self) -> &'static str
Stable, short, snake_case string discriminator for the
variant. Used by the FFI shims (Python / Node / Go) to
expose a kind field on the host-language error so
callers can branch on the error type without parsing
the rendered message. Values are part of the public
SDK contract — adding new variants is fine, renaming
existing ones is a breaking change.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for MeshError
impl<'de> Deserialize<'de> for MeshError
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Error for MeshError
impl Error for MeshError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()