Snapshot isolation
In one line: every read sees a consistent view of the database frozen at the transaction's start — no locks, no waiting on writers.
Visibility is keyed on the TSN (Transaction Sequence Number), Typhon's visibility clock. A reader sees every change committed with TSN ≤ its own, plus its own uncommitted writes; it never sees anyone else's uncommitted writes, nor any commit that landed after it began. Readers never take a lock and never block a writer — the cost is keeping older versions around while someone might still need them.
Because the snapshot is fixed, this prevents dirty reads, non-repeatable reads, and phantoms — re-running a query inside one transaction never surfaces rows another transaction committed after your snapshot. It is still not serializable: the anomaly it permits is write skew — two transactions each read an overlapping set, then write disjoint items, together breaking an invariant that spans them. Only Versioned components get this; SingleVersion/Transient reads are live (the latest in-place value), with no isolation.
⚠️ "Point in time" here means your transaction's start — a consistent current view. It is not reading historical/past versions (Typhon has no user-facing as-of-past read API). Don't confuse it with
PointInTimeAccessor, which is the same idea fanned across threads.
How it relates
- Transaction — fixes the snapshot at creation; its TSN is the snapshot.
- Storage mode — only
Versionedis snapshot-isolated; the fast modes opt out. - Durability — mode & discipline — the other clock; a change can be visible before it is durable.
- PointInTimeAccessor — a single snapshot shared by many worker threads.
- Conflict resolution — the write side: what happens when two snapshots write the same entity.
In the API
Transaction— its TSN is the read snapshot.EntityRef—Read<T>resolves the version visible at that TSN.
Learn & use
- Narrative: Guide ch.3 §4 — reads: snapshot isolation
- Reference: Isolation & durability cheat sheet
- Feature detail: Versioned storage mode · optimistic conflict resolution