MVCC snapshot isolation

DesignHard50 minOracle and Snowflake style

Your task

Design the MVCC (multi-version concurrency control) layer for an OLTP database that must give readers a consistent snapshot without blocking writers, and writers without blocking readers, at SNAPSHOT ISOLATION (with an option for SERIALIZABLE). Workload: 100k tx/sec, mostly short transactions, mix of point reads/writes and some long-running analytics reads that must not stall OLTP. Describe how versions are stored and visible, how you assign transaction timestamps/IDs, how you prevent write-write conflicts, and how you reclaim dead versions. Call out the central operational hazard.

It covers

  • Mvcc
  • Isolation levels
  • Garbage collection