Code RoomMVCC snapshot isolation
HardPrep Room Coding #3158

MVCC snapshot isolation

System designDatabases & SQLSenior–Staff~50 min

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.

What a strong answer looks like

Clarify scale and constraints first. Propose a clean component breakdown, then go deep on the hard parts (data model, bottlenecks, consistency, failure modes) and name the trade-offs you are making.

Clarify5:30 left
Estimate5:30 planned
Design16:30 planned
Deep dive13:30 planned
Failure9:00 planned
0:00
Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.