Index

LSM 06-07: Compaction and Levels

The Message Store Saga
The Message Store Saga · Open board

The Discord case-study board on a message store whose trouble came from the thing this lesson builds. Part of the LSM series, Build Your Own LSM Tree.

Before you start. This series builds a small copy of a storage engine that never edits a file in place. LSM 03-04: Table Files and the Sparse Index made flushing safe and lookups cheap per file, and LSM 05: The Bloom Filter let a lookup skip files that cannot hold a key. Neither stops the number of files growing with every flush. This lesson builds the background job that merges them, then arranges the files in levels so a lookup touches about one.

Continue reading with a plan

The first three lessons of every track are free. This lesson is included with a plan, which unlocks every lesson, board, video, lab and paper for one price.

View plans →Already a member? Sign in

Related paper

Review From Scratch →

Saved in this browser, and to your account when you sign in.