Table of Contents

Storage mode

In one line: a per-component, design-time choice of memory layout and ACID guarantees — Versioned, SingleVersion, or Transient.

Set on the [Component] attribute and fixed for a given (component name, revision) — to change the mode, bump the [Component] revision; re-using the same revision with a different mode throws InvalidOperationException on reopen, and so does a revision that changes the field layout and the mode (no migration moves data between layouts). Because it lives on the component type, one archetype freely mixes all three. The mode decides whether MVCC/isolation exists at all — and what a write costs.

Mode Isolation Rollback reverts a write Durability Write cost (Zen 4)
Versioned (default) snapshot isolation, MVCC history yes zero loss, full ACID ~250 ns
SingleVersion none — live, last-writer-wins no by default; yes under the Commit discipline (O(1), staging discarded) ≤ 1 tick loss (tick-fence WAL) ~40 ns
Transient none — live no none — heap only, gone on crash ~40 ns

Measured on Ryzen 9 7950X (Zen 4), .NET 10 Release, hot cache. A Versioned write is ~6× a fast-mode write (copy-on-write: allocate a chunk, copy the value, append a revision, stamp a TSN); reads follow suit — ~80 ns vs ~15 ns (~5×).

📌 Committed is not a fourth mode. It is the Commit discipline layered on the byte-identical SingleVersion layout — commit-time, zero-loss, atomic durability and O(1) rollback, without a revision chain. It moves three ACID properties at once — isolation, rollback and durability — which is why the enum is named for the commit, not for durability alone.

How it relates

  • Snapshot isolation — only Versioned provides it.
  • Durability — mode & discipline — the Commit discipline applies only to the SingleVersion layout.
  • Transaction — what "transactional" guarantees per mode.
  • Tick fence — where SingleVersion durability is realised.
  • Cluster storage — the batched SoA layout every archetype gets; the mode decides where a component's array sits inside the cluster and whether it is page-cache backed.

In the API

Learn & use