Skip to main content

RuntimeConfig

Struct RuntimeConfig 

Source
#[non_exhaustive]
pub struct RuntimeConfig {
Show 17 fields pub memory: MemoryBudget, pub deterministic: bool, pub profile: bool, pub max_iterations: u32, pub strict_deterministic_d2h: bool, pub wcoj_triangle_dispatch: Option<bool>, pub wcoj_triangle_dispatch_adaptive: Option<bool>, pub wcoj_triangle_dispatch_disabled: Option<bool>, pub wcoj_4cycle_dispatch: Option<bool>, pub wcoj_4cycle_dispatch_adaptive: Option<bool>, pub wcoj_4cycle_dispatch_disabled: Option<bool>, pub wcoj_cost_model: Option<CostModelKind>, pub common_subexpression_elimination: Option<bool>, pub adaptive_reoptimization: Option<bool>, pub adaptive_reoptimization_min_misplan_ratio: Option<f64>, pub persistent_hash_indexes: Option<bool>, pub persistent_hash_index_background_build: Option<bool>,
}
Expand description

Runtime configuration for XLOG execution.

Use RuntimeConfig::default() and the builder methods to construct.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§memory: MemoryBudget

Memory budget settings

§deterministic: bool

Use deterministic execution (may be slower)

§profile: bool

Enable profiling (row counts, memory tracking)

§max_iterations: u32

Maximum fixpoint iterations before abort

§strict_deterministic_d2h: bool

Opt-in: enforce the strict deterministic-Datalog D2H gate during Executor::execute_plan. When true, any data-plane device-to-host transfer (column downloads, internal dtoh_sync_copy_into_tracked calls) returns XlogError::Execution and increments the provider’s deterministic_d2h_violation_count. Metadata reads via dtoh_scalar_untracked remain allowed.

Default false: v0.5.5 still has known data-plane D2H paths in relational set difference and binary-join count/materialize that are scheduled for replacement before the default flips.

§wcoj_triangle_dispatch: Option<bool>

Override the env-driven WCOJ triangle dispatch gate (XLOG_USE_WCOJ_TRIANGLE_U32). None (default) consults the env var; Some(true) / Some(false) force the runtime to ignore the env and use the explicit value. Test-only knob — production callers should leave this None and configure via the env var.

§wcoj_triangle_dispatch_adaptive: Option<bool>

Override the stats-backed WCOJ triangle dispatch gate. None uses the production default. Some(true) enables the cardinality model; Some(false) disables this runtime’s default stats-backed decision.

§wcoj_triangle_dispatch_disabled: Option<bool>

Runtime-local hard stop for WCOJ triangle dispatch. Some(true) pins dispatch off across force and stats mode. Some(false) leaves dispatch available for this runtime. None uses the production default.

§wcoj_4cycle_dispatch: Option<bool>

v0.6.5 slice 2 — force gate for the 4-cycle WCOJ dispatch. Some(true) / env XLOG_USE_WCOJ_4CYCLE=1 forces every recognized 4-cycle to dispatch the GPU kernel. Some(false) is explicit force-off. None (default) consults the env.

§wcoj_4cycle_dispatch_adaptive: Option<bool>

v0.6.5 slice 2 — adaptive opt-in for 4-cycle WCOJ. Unlike triangle, 4-cycle adaptive is opt-in by default, not default-on: None resolves to false. Default-on for 4-cycle is a separate follow-up slice gated by bench evidence.

§wcoj_4cycle_dispatch_disabled: Option<bool>

v0.6.5 slice 2 — kill switch for 4-cycle WCOJ. Same shape as triangle’s kill switch: beats force + adaptive.

§wcoj_cost_model: Option<CostModelKind>

v0.6.5 W2.5 — selects the runtime WCOJ cost model. None resolves by env/default precedence; see RuntimeConfig::with_wcoj_cost_model.

§common_subexpression_elimination: Option<bool>

v0.8.6 G086_CSE — runtime common subexpression elimination.

Some(true) enables structural CSE for safe deterministic subplans. Some(false) disables it. None consults XLOG_CSE; unset defaults to disabled so existing runtime behavior is preserved unless the caller opts in.

§adaptive_reoptimization: Option<bool>

v0.8.6 G086_ADAPT — runtime adaptive re-optimization adoption gate.

Some(true) allows an executor to compare a baseline plan against a compiler-supplied candidate plan using runtime telemetry, adopt the candidate only when deterministic mis-plan thresholds trigger, and roll back on adverse candidates. Some(false) disables the adoption path. None consults XLOG_ADAPTIVE_REOPT; unset defaults to disabled.

§adaptive_reoptimization_min_misplan_ratio: Option<f64>

Minimum mis-plan ratio required before the executor attempts to adopt a candidate re-optimized plan. None consults XLOG_ADAPTIVE_REOPT_MIN_RATIO; unset or invalid values default to 1.2.

§persistent_hash_indexes: Option<bool>

v0.8.6 G086_INDEX — persistent hash index manager gate.

Some(true) enables persistent build-side hash index reuse in the existing executor join-index cache. Some(false) disables the manager. None consults XLOG_PERSISTENT_HASH_INDEXES; unset defaults to enabled to preserve the existing adaptive-indexing behavior.

§persistent_hash_index_background_build: Option<bool>

v0.8.6 G086_INDEX — record background-build mode for the persistent hash index manager. The current runtime keeps builds on the existing provider path but records background build requests/completions so the transition to recorded asynchronous builds has stable telemetry.

Implementations§

Source§

impl RuntimeConfig

Source

pub fn with_profiling(self) -> Self

Enable profiling

Source

pub fn with_memory(self, memory: MemoryBudget) -> Self

Set memory budget

Source

pub fn with_strict_deterministic_d2h(self) -> Self

Enable the strict deterministic-Datalog D2H gate for this runtime.

Source

pub fn with_wcoj_triangle_dispatch(self, override_value: Option<bool>) -> Self

Override the env-driven WCOJ triangle dispatch gate. Pass Some(true) / Some(false) to force the runtime to ignore XLOG_USE_WCOJ_TRIANGLE_U32; None to consult the env var (the production default). Test-only knob.

Source

pub fn with_wcoj_triangle_dispatch_adaptive( self, override_value: Option<bool>, ) -> Self

Override the stats-backed WCOJ triangle dispatch gate. Force-WCOJ (with_wcoj_triangle_dispatch(Some(true))) takes precedence.

Source

pub fn with_wcoj_triangle_dispatch_disabled( self, override_value: Option<bool>, ) -> Self

Engage / disengage the runtime-local WCOJ triangle dispatch hard stop.

Source

pub fn with_wcoj_4cycle_dispatch(self, override_value: Option<bool>) -> Self

v0.6.5 slice 2 — override the 4-cycle force-gate. Some(true) forces the GPU kernel; Some(false) is explicit force-off; None consults XLOG_USE_WCOJ_4CYCLE.

Source

pub fn with_wcoj_4cycle_dispatch_adaptive( self, override_value: Option<bool>, ) -> Self

v0.6.5 slice 2 — override the 4-cycle stats opt-in. Some(true) engages the cardinality model; Some(false) skips it. None resolves to false (opt-in by default — 4-cycle does NOT inherit triangle’s default-on behavior).

Source

pub fn with_wcoj_4cycle_dispatch_disabled( self, override_value: Option<bool>, ) -> Self

v0.6.5 slice 2 — engage / disengage the 4-cycle kill switch. Same shape as the triangle kill switch.

Source

pub fn with_wcoj_cost_model(self, kind: Option<CostModelKind>) -> Self

Select which WCOJ cost-model implementation the runtime consults.

Precedence:

  1. Explicit config field set here.
  2. XLOG_WCOJ_COST_MODEL=cardinality or skew.
  3. Default Cardinality.
Source

pub fn with_common_subexpression_elimination( self, override_value: Option<bool>, ) -> Self

Enable or disable runtime common subexpression elimination.

Source

pub fn with_adaptive_reoptimization(self, override_value: Option<bool>) -> Self

Enable or disable adaptive runtime re-optimization adoption.

Source

pub fn with_adaptive_reoptimization_min_misplan_ratio( self, override_value: Option<f64>, ) -> Self

Set the minimum mis-plan ratio for adaptive runtime re-optimization.

Source

pub fn with_persistent_hash_indexes(self, override_value: Option<bool>) -> Self

Enable or disable persistent build-side hash index reuse.

Source

pub fn with_persistent_hash_index_background_build( self, override_value: Option<bool>, ) -> Self

Enable or disable persistent hash-index background-build telemetry.

Source

pub fn resolved_common_subexpression_elimination(&self) -> bool

Resolve runtime common subexpression elimination by config/env/default.

Source

pub fn resolved_adaptive_reoptimization(&self) -> bool

Resolve adaptive runtime re-optimization by config/env/default.

Source

pub fn resolved_adaptive_reoptimization_min_misplan_ratio(&self) -> f64

Resolve the deterministic mis-plan threshold for adaptive re-optimization.

Source

pub fn resolved_persistent_hash_indexes(&self) -> bool

Resolve persistent hash-index reuse by config/env/default.

Source

pub fn resolved_persistent_hash_index_background_build(&self) -> bool

Resolve background-build telemetry for persistent hash indexes.

Source

pub fn resolved_wcoj_cost_model(&self) -> CostModelKind

Resolve the effective WCOJ cost-model selector.

Trait Implementations§

Source§

impl Clone for RuntimeConfig

Source§

fn clone(&self) -> RuntimeConfig

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RuntimeConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for RuntimeConfig

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.