From 1c23d43d055065df8fcd2e643d2efa5c434aff04 Mon Sep 17 00:00:00 2001 From: Alex Chi Z Date: Tue, 23 Jan 2024 14:54:16 +0800 Subject: [PATCH] update progress Signed-off-by: Alex Chi Z --- README.md | 4 ++-- mini-lsm-book/src/week2-03-tiered.md | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d6807c2..f21e2cd 100644 --- a/README.md +++ b/README.md @@ -57,8 +57,8 @@ We are working on a new version of the mini-lsm tutorial that is split into 3 we | 1.7 | Bloom Filter and Key Compression | ✅ | ✅ | ✅ | | 2.1 | Compaction Implementation | ✅ | ✅ | ✅ | | 2.2 | Compaction Strategy - Simple | ✅ | ✅ | ✅ | -| 2.3 | Compaction Strategy - Tiered | ✅ | 🚧 | 🚧 | -| 2.4 | Compaction Strategy - Leveled | ✅ | 🚧 | 🚧 | +| 2.3 | Compaction Strategy - Tiered | ✅ | ✅ | 🚧 | +| 2.4 | Compaction Strategy - Leveled | ✅ | ✅ | 🚧 | | 2.5 | Manifest | ✅ | 🚧 | 🚧 | | 2.6 | Write-Ahead Log | ✅ | 🚧 | 🚧 | | 2.7 | Batch Write + Checksum | | | | diff --git a/mini-lsm-book/src/week2-03-tiered.md b/mini-lsm-book/src/week2-03-tiered.md index 8211546..12ffec8 100644 --- a/mini-lsm-book/src/week2-03-tiered.md +++ b/mini-lsm-book/src/week2-03-tiered.md @@ -19,6 +19,8 @@ The tiered compaction we talk about in this chapter is the same as RocksDB's uni ## Task 2: Integrate with the Read Path +As tiered compaction does not use the L0 level of the LSM state, you should directly flush your memtables to a new tier instead of as an L0 SST. You can use `self.compaction_controller.flush_to_l0()` to know whether to flush to L0. You may use the first output SST id as the level/tier id for your new sorted run. + ## Test Your Understanding * What are the pros/cons of universal compaction compared with simple leveled/tiered compaction?