Enum CommitDiscipline
- Namespace
- Typhon.Schema.Definition
- Assembly
- Typhon.Schema.Definition.dll
Whether a write to a SingleVersion-layout component participates in the transaction or bypasses it and rides the tick fence —
selected per transaction, orthogonal to the design-time StorageMode (which fixes the cluster layout) and to the per-UoW
DurabilityMode (which fixes flush timing).
public enum CommitDiscipline : byte
Fields
Commit = 1Writes are staged per transaction and made atomic + zero-loss durable at
Transaction.Commitvia a logical-redo WAL record, then published in place — read-committed isolation, O(1) rollback, no revision chain. For writes that must not be lost and must be all-or-nothing (teleport, item pickup) without paying for MVCC.TickFence = 0Default. In-place writes, last-writer-wins, durability batched at the tick fence (≤1-tick loss). Maximum throughput for high-frequency, loss-tolerant data (position, velocity, health).
Remarks
Three ACID properties move together with this one knob, and only one of them is durability:
| TickFence / Commit | |
|---|---|
| Isolation | none, visible immediately / read-committed |
Rollback reverts the write | no / yes, O(1) — the staging buffer is discarded |
| Durability | ≤ 1 tick of loss / zero loss at commit |
It was called DurabilityDiscipline until #648, named after its neighbour DurabilityMode rather than after its function. That name is why
two of the guide pages told users a SingleVersion write can never be rolled back: the rollback behaviour is not something a
reader looks for on an enum whose name says durability. Staging was not chosen in order to provide rollback — Variant B (in-place plus undo log) was
rejected as crash-unsafe (rule CM-01) — but that is the implementer's motivation, not the caller's contract, and a public enum should name what the
caller gets.
The VALUE names deliberately did not change with it. CommitDiscipline.Commit reads tautologically, and Fence/Transactional were
considered, but the value is what appears in every call site and doc sample: a second source-breaking rename buys a nicer word, not a correction.
The discipline is a transaction-time knob; it does NOT change a component's storage layout and is NOT a new StorageMode value. It only applies to the SingleVersion layout — Versioned is always commit-scoped and Transient is never durable.
See claude/design/Ecs/committed-storage-mode.md (the authoritative feature spec) and ADR-057.