Learning series · 5 episodes · Senior / Staff
Inside the database
Five distinct storage-engine questions from append-only files to durable WAL, B-tree splits, LSM runs, and compaction stalls.
Start series →Follow the decisions in order
- Part 1 of 5
Senior
The writes are fast. Why does one lookup scan a terabyte?Locating the newest value in an append-only store through an in-memory key directory, preserving tombstones, reclaiming segments, and rebuilding the index on restart.
- Part 2 of 5
Staff
COMMIT succeeded. What exactly survived the crash?Defining a local durable-commit boundary and the role of WAL ordering, fsync, checkpoints, torn pages, and recovery under process versus system failure.
- Part 3 of 5
Senior
One insert filled a B-tree page. What has to move?How B-tree leaf and parent page splits preserve ordered lookup under concurrent writers, including latches, fillfactor, key distribution, and secondary-row fetches.
- Part 4 of 5
Senior
We stopped updating disk pages on every write. Where did the data go?Tracing LSM updates through WAL, memtables, immutable SSTs, overlapping L0 files, point reads, versioned deletes, and snapshots.
- Part 5 of 5
Staff
Writes were fast for an hour. Why did the engine suddenly stop?Identifying an unsustainable background work rate and the distinct RocksDB stall triggers, then validating steady state without defeating durability or read health.