Skip to content

fix(config): Auto engine selection must not land on PageBased (production hardening) - #383

Merged
MPCoreDeveloper merged 1 commit into
masterfrom
fix/default-engine-selection
Sep 4, 2026
Merged

fix(config): Auto engine selection must not land on PageBased (production hardening)#383
MPCoreDeveloper merged 1 commit into
masterfrom
fix/default-engine-selection

Conversation

@MPCoreDeveloper

Copy link
Copy Markdown
Owner

Samenvatting

Production hardening: Auto-engine-selectie mag niet op PageBased landen.

Met default-configuratie (StorageEngineType.Auto + WorkloadHint.General) gaf
GetOptimalStorageEngine() PageBased terug. De PageBased-engine is niet OLTP-rijp (gemeten
UPDATE ~26K ops/s vs ~245K ops/s op het fixed-width Columnar-pad), dus elke default-database liep
risico op het trage engine-pad zodra ergens Auto-selectie gehonoreerd wordt.

Fix:

  • Auto selecteert voor General / WriteHeavy / onbekende hints nu AppendOnly/Columnar.
  • PageBased blijft bereikbaar via expliciet StorageEngineType.PageBased (opt-in) tot de
    UPDATE/DELETE-fast paths parity halen.

Regressie (DefaultEngineSelectionTests)

  1. Mapping: new DatabaseConfig().GetOptimalStorageEngine() == AppendOnly; expliciete PageBased
    opt-in blijft PageBased.
  2. Een default database maakt een Columnar fixed-width PK-tabel (StorageMode.Columnar,
    IsFixedWidthRecords=true, engine AppendOnly), DELETE van 500 oplopende rijen engageert de
    single-pass contiguous fast path (BulkContiguousDeleteBatches == 1) en er ontstaan géén
    .pages-artefacten.

Validatie

  • Full suite: 1768 tests, 0 failed (Release).
  • Geen gedragswijziging voor bestaande DB's (metadata/format onaangeroerd); alleen de Auto-keuze.

…ing)

With default config (StorageEngineType.Auto + WorkloadHint.General),
GetOptimalStorageEngine returned PageBased. The PageBased engine is not yet
OLTP-ready (measured UPDATE ~26K ops/s vs ~245K ops/s on the fixed-width
Columnar path), so every default-created database risked ending up on the slow
engine wherever Auto selection is honored. Auto now routes General / WriteHeavy
/ unknown hints to AppendOnly/Columnar; PageBased stays reachable only through
an explicit StorageEngineType.PageBased until its UPDATE/DELETE fast paths
reach parity.

Regression: DefaultEngineSelectionTests assert (1) the mapping itself and
(2) that a DEFAULT database creates a Columnar fixed-width PK table that
engages the single-pass contiguous DELETE fast path and leaves no .pages
artifacts. Full suite 1768 tests, 0 failed.
@sonarqubecloud

sonarqubecloud Bot commented Sep 4, 2026

Copy link
Copy Markdown

@MPCoreDeveloper
MPCoreDeveloper merged commit 097c51c into master Sep 4, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant