Skip to main content

Module config_matrix

Module config_matrix 

Source
Expand description

Performance / operational config matrix.

Two tiers:

  • Tier A (Critical) — self-healing on boot. If the key is missing from red_config, the loader writes the default in. Operators always see these via SHOW CONFIG so they know what guarantees and tuning they have.
  • Tier B (Optional) — in-memory default. Never self-populated. Appears in SHOW CONFIG only after an explicit SET CONFIG.

The matrix is the single source of truth for perf / durability / concurrency / storage keys introduced by the perf-parity push. It intentionally does not cover the pre-existing red.* trees (ai, server, storage, search, etc.) — those have their own lifecycle in impl_core. Keys here live under the new cache.*, durability.*, concurrency.*, storage.* namespaces.

Structs§

ConfigDefault
Default value encoded as JSON so the loader can delegate to set_config_tree which already handles every Value variant.

Enums§

Tier

Constants§

MATRIX
The full matrix. Keep sorted by namespace for readability.

Functions§

default_for
Fetch the JSON default for a matrix key. Returns None when the key is not in the matrix (callers should treat that as a programming error — unknown key, unknown tier, unknown semantics).
heal_critical_keys
Boot-time self-healing pass: for every Tier::Critical key, if red_config does not already contain the key, write the default in. Idempotent — re-running produces no writes.
tier_for
Tier lookup — useful for tests and for introspection commands that want to report whether a key is expected to self-heal.