Module 3 · Dive 3.1
Volume, LSN, snapshot.
A Volume is an append-only log; each commit gets the next LSN. So “the state at LSN k” is just the log folded up to k — and a snapshot is a read at an LSN, nothing more. Because nothing is ever overwritten in place, every past point is still readable. Scrub the ribbon and read any of them.
A read at an LSN
interactiveWhy time travel is free
graft.design.mdAppend-only is the whole trick. A reader holding LSN k sees a fixed prefix of the log no matter how many commits land after, so reads need no lock and snapshots need no copy — the same property the persistent structure gave Champ in Module 2, now at the log level. It is also what makes a replica’s “catch up to LSN k” and the change feed’s “everything after LSN k” well-defined. The one hard part is appending the next LSN when two writers want it at once — the next two dives.
References & sources
- Echo records
- graft.design.mdVolume, LSN, snapshot, checkout-at-LSN
- store.design.mdthe append-only page log
- External
- orbitinghail/graftthe LSN-log model
- Multiversion concurrency controlread-at-version, snapshots
- Designing Data-Intensive Applications, Kleppmann 2017snapshot isolation, logs (Ch. 3, 7)