Code RoomOn-disk B+tree ACID index
HardPrep Room Coding #3149

On-disk B+tree ACID index

System designDatabases & SQLConcurrencySenior–Staff~50 min

Design the on-disk B+tree index structure for a single-node embedded OLTP store (think SQLite/LMDB class) that must support fully ACID transactions, crash safety without a separate WAL if possible, and many concurrent readers that never block a writer. Workload is 95% point lookups and short range scans, 5% updates, dataset ~200GB on a single NVMe drive, p99 read latency target 2ms. Walk through the page/node layout, how you achieve durability and reader/writer concurrency, and the central trade-off of your design.

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.