#[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
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.memory: MemoryBudgetMemory budget settings
deterministic: boolUse deterministic execution (may be slower)
profile: boolEnable profiling (row counts, memory tracking)
max_iterations: u32Maximum fixpoint iterations before abort
strict_deterministic_d2h: boolOpt-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
impl RuntimeConfig
Sourcepub fn with_profiling(self) -> Self
pub fn with_profiling(self) -> Self
Enable profiling
Sourcepub fn with_memory(self, memory: MemoryBudget) -> Self
pub fn with_memory(self, memory: MemoryBudget) -> Self
Set memory budget
Sourcepub fn with_strict_deterministic_d2h(self) -> Self
pub fn with_strict_deterministic_d2h(self) -> Self
Enable the strict deterministic-Datalog D2H gate for this runtime.
Sourcepub fn with_wcoj_triangle_dispatch(self, override_value: Option<bool>) -> Self
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.
Sourcepub fn with_wcoj_triangle_dispatch_adaptive(
self,
override_value: Option<bool>,
) -> Self
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.
Sourcepub fn with_wcoj_triangle_dispatch_disabled(
self,
override_value: Option<bool>,
) -> Self
pub fn with_wcoj_triangle_dispatch_disabled( self, override_value: Option<bool>, ) -> Self
Engage / disengage the runtime-local WCOJ triangle dispatch hard stop.
Sourcepub fn with_wcoj_4cycle_dispatch(self, override_value: Option<bool>) -> Self
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.
Sourcepub fn with_wcoj_4cycle_dispatch_adaptive(
self,
override_value: Option<bool>,
) -> Self
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).
Sourcepub fn with_wcoj_4cycle_dispatch_disabled(
self,
override_value: Option<bool>,
) -> Self
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.
Sourcepub fn with_wcoj_cost_model(self, kind: Option<CostModelKind>) -> Self
pub fn with_wcoj_cost_model(self, kind: Option<CostModelKind>) -> Self
Select which WCOJ cost-model implementation the runtime consults.
Precedence:
- Explicit config field set here.
XLOG_WCOJ_COST_MODEL=cardinalityorskew.- Default
Cardinality.
Sourcepub fn with_common_subexpression_elimination(
self,
override_value: Option<bool>,
) -> Self
pub fn with_common_subexpression_elimination( self, override_value: Option<bool>, ) -> Self
Enable or disable runtime common subexpression elimination.
Sourcepub fn with_adaptive_reoptimization(self, override_value: Option<bool>) -> Self
pub fn with_adaptive_reoptimization(self, override_value: Option<bool>) -> Self
Enable or disable adaptive runtime re-optimization adoption.
Sourcepub fn with_adaptive_reoptimization_min_misplan_ratio(
self,
override_value: Option<f64>,
) -> Self
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.
Sourcepub fn with_persistent_hash_indexes(self, override_value: Option<bool>) -> Self
pub fn with_persistent_hash_indexes(self, override_value: Option<bool>) -> Self
Enable or disable persistent build-side hash index reuse.
Sourcepub fn with_persistent_hash_index_background_build(
self,
override_value: Option<bool>,
) -> Self
pub fn with_persistent_hash_index_background_build( self, override_value: Option<bool>, ) -> Self
Enable or disable persistent hash-index background-build telemetry.
Sourcepub fn resolved_common_subexpression_elimination(&self) -> bool
pub fn resolved_common_subexpression_elimination(&self) -> bool
Resolve runtime common subexpression elimination by config/env/default.
Sourcepub fn resolved_adaptive_reoptimization(&self) -> bool
pub fn resolved_adaptive_reoptimization(&self) -> bool
Resolve adaptive runtime re-optimization by config/env/default.
Sourcepub fn resolved_adaptive_reoptimization_min_misplan_ratio(&self) -> f64
pub fn resolved_adaptive_reoptimization_min_misplan_ratio(&self) -> f64
Resolve the deterministic mis-plan threshold for adaptive re-optimization.
Sourcepub fn resolved_persistent_hash_indexes(&self) -> bool
pub fn resolved_persistent_hash_indexes(&self) -> bool
Resolve persistent hash-index reuse by config/env/default.
Sourcepub fn resolved_persistent_hash_index_background_build(&self) -> bool
pub fn resolved_persistent_hash_index_background_build(&self) -> bool
Resolve background-build telemetry for persistent hash indexes.
Sourcepub fn resolved_wcoj_cost_model(&self) -> CostModelKind
pub fn resolved_wcoj_cost_model(&self) -> CostModelKind
Resolve the effective WCOJ cost-model selector.
Trait Implementations§
Source§impl Clone for RuntimeConfig
impl Clone for RuntimeConfig
Source§fn clone(&self) -> RuntimeConfig
fn clone(&self) -> RuntimeConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more