pub struct ExecScopedAccess { /* private fields */ }Expand description
SRD-89 §3b / SRD-90 §M6 — scope every read to its reading execution by
injecting exec_id as a uniform dimensional-label matcher, so each
interior backend applies it wherever exec_id lives (the in-memory tier’s
label set, the sqlite tier’s exec_id column) with the same value. This
replaces the per-backend special-casing (the live tier’s bespoke post-filter,
a sqlite selection mode) with one mechanism: exec_id is just a label.
None (single-run / outside any execution scope) ⇒ no injection — the read
is unscoped and sees the sole execution’s data, byte-identical to before
(axiom A1). If the caller already constrained exec_id, nothing is injected.
Implementations§
Source§impl ExecScopedAccess
impl ExecScopedAccess
pub fn new(inner: Arc<dyn MetricAccess>) -> Self
Trait Implementations§
Source§impl MetricAccess for ExecScopedAccess
impl MetricAccess for ExecScopedAccess
Source§fn select_range(
&self,
matchers: &[Matcher],
start_ms: i64,
end_ms: i64,
) -> Result<Vector, QueryError>
fn select_range( &self, matchers: &[Matcher], start_ms: i64, end_ms: i64, ) -> Result<Vector, QueryError>
Range selection: series matching every
matcher, with every
sample in [start_ms, end_ms] (ascending). Yields a range
vector — the input a rollup (rate(m[w]), *_over_time)
consumes. This is the one required method; select_instant
derives from it.Source§fn select_instant(
&self,
matchers: &[Matcher],
at_ms: i64,
lookback_ms: Option<i64>,
) -> Result<Vector, QueryError>
fn select_instant( &self, matchers: &[Matcher], at_ms: i64, lookback_ms: Option<i64>, ) -> Result<Vector, QueryError>
Instant selection: series matching every
matcher, each reduced
to its latest sample within [at_ms - lookback, at_ms] (the
PromQL stale-tolerance window; lookback_ms = None means a
strict [at_ms, at_ms]). Yields an instant vector — one sample
per series. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for ExecScopedAccess
impl !UnwindSafe for ExecScopedAccess
impl Freeze for ExecScopedAccess
impl Send for ExecScopedAccess
impl Sync for ExecScopedAccess
impl Unpin for ExecScopedAccess
impl UnsafeUnpin for ExecScopedAccess
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
Mutably borrows from an owned value. Read more