From beb3feabf98ebbf64a99c9c649ea4e81cc98818e Mon Sep 17 00:00:00 2001 From: Alex Chi Z Date: Fri, 19 Jan 2024 12:15:01 +0800 Subject: [PATCH] move merge iterator to day 2 Signed-off-by: Alex Chi Z --- mini-lsm-book/src/01-block.md | 2 +- mini-lsm-book/src/02-sst.md | 2 +- mini-lsm-book/src/03-memtable.md | 2 +- mini-lsm-book/src/SUMMARY.md | 6 +- .../src/lsm-tutorial/00-lsm-read-flow.svg | 4 +- .../src/lsm-tutorial/00-lsm-write-flow.svg | 4 +- .../src/lsm-tutorial/week1-01-overview.svg | 4 +- .../src/lsm-tutorial/week1-02-overview.svg | 214 +---------------- .../src/lsm-tutorial/week1-03-overview.svg | 70 +++--- .../src/lsm-tutorial/week1-04-overview.svg | 225 +++++++++++++++--- .../src/lsm-tutorial/week1-05-overview.svg | 111 +++++++++ .../src/lsm-tutorial/week1-07-overview.svg | 6 +- .../src/lsm-tutorial/week1-overview.svg | 16 +- .../src/lsm-tutorial/week2-01-overview.svg | 4 +- .../src/lsm-tutorial/week2-05-overview.svg | 6 +- .../src/lsm-tutorial/week2-06-overview.svg | 6 +- .../src/lsm-tutorial/week2-overview.svg | 4 +- ...02-block.md => week1-02-merge-iterator.md} | 2 +- .../{week1-03-sst.md => week1-03-block.md} | 2 +- mini-lsm-book/src/week1-04-merge-iterator.md | 3 - mini-lsm-book/src/week1-04-sst.md | 3 + mini-lsm-book/src/week1-05-read-path.md | 2 +- mini-lsm-book/src/week1-06-write-path.md | 2 +- 23 files changed, 387 insertions(+), 313 deletions(-) create mode 100644 mini-lsm-book/src/lsm-tutorial/week1-05-overview.svg rename mini-lsm-book/src/{week1-02-block.md => week1-02-merge-iterator.md} (77%) rename mini-lsm-book/src/{week1-03-sst.md => week1-03-block.md} (67%) delete mode 100644 mini-lsm-book/src/week1-04-merge-iterator.md create mode 100644 mini-lsm-book/src/week1-04-sst.md diff --git a/mini-lsm-book/src/01-block.md b/mini-lsm-book/src/01-block.md index 7049deca..909cb27f 100644 --- a/mini-lsm-book/src/01-block.md +++ b/mini-lsm-book/src/01-block.md @@ -2,7 +2,7 @@
-This is a legacy version of the Mini-LSM tutorial and we will not maintain it anymore. We are working on a new version of this tutorial and this chapter is now part of [Mini-LSM Week 1 Day 2: Blocks](./week1-02-block.md). +This is a legacy version of the Mini-LSM tutorial and we will not maintain it anymore. We are working on a new version of this tutorial and this chapter is now part of [Mini-LSM Week 1 Day 3: Blocks](./week1-03-block.md).
diff --git a/mini-lsm-book/src/02-sst.md b/mini-lsm-book/src/02-sst.md index 261c4203..703b7f14 100644 --- a/mini-lsm-book/src/02-sst.md +++ b/mini-lsm-book/src/02-sst.md @@ -2,7 +2,7 @@
-This is a legacy version of the Mini-LSM tutorial and we will not maintain it anymore. We are working on a new version of this tutorial and this chapter is now part of [Mini-LSM Week 1 Day 3: Sorted String Table (SST)](./week1-03-sst.md). +This is a legacy version of the Mini-LSM tutorial and we will not maintain it anymore. We are working on a new version of this tutorial and this chapter is now part of [Mini-LSM Week 1 Day 4: Sorted String Table (SST)](./week1-04-sst.md).
diff --git a/mini-lsm-book/src/03-memtable.md b/mini-lsm-book/src/03-memtable.md index 663861e3..fd493f33 100644 --- a/mini-lsm-book/src/03-memtable.md +++ b/mini-lsm-book/src/03-memtable.md @@ -2,7 +2,7 @@
-This is a legacy version of the Mini-LSM tutorial and we will not maintain it anymore. We are working on a new version of this tutorial and this chapter is now part of [Mini-LSM Week 1 Day 1: Memtable](./week1-01-memtable.md) and [Mini-LSM Week 1 Day 4: Merge Iterator](./week1-04-merge-iterator.md) +This is a legacy version of the Mini-LSM tutorial and we will not maintain it anymore. We are working on a new version of this tutorial and this chapter is now part of [Mini-LSM Week 1 Day 1: Memtable](./week1-01-memtable.md) and [Mini-LSM Week 1 Day 2: Merge Iterator](./week1-02-merge-iterator.md)
diff --git a/mini-lsm-book/src/SUMMARY.md b/mini-lsm-book/src/SUMMARY.md index 29d32167..3fd417f1 100644 --- a/mini-lsm-book/src/SUMMARY.md +++ b/mini-lsm-book/src/SUMMARY.md @@ -24,9 +24,9 @@ - [Week 1: Mini-LSM](./week1-overview.md) - [Memtable](./week1-01-memtable.md) - - [Block](./week1-02-block.md) - - [Sorted String Table (SST)](./week1-03-sst.md) - - [Merge Iterator](./week1-04-merge-iterator.md) + - [Merge Iterator](./week1-02-merge-iterator.md) + - [Block](./week1-03-block.md) + - [Sorted String Table (SST)](./week1-04-sst.md) - [Read Path](./week1-05-read-path.md) - [Write Path](./week1-06-write-path.md) - [Snack Time: SST Optimizations](./week1-07-sst-optimizations.md) diff --git a/mini-lsm-book/src/lsm-tutorial/00-lsm-read-flow.svg b/mini-lsm-book/src/lsm-tutorial/00-lsm-read-flow.svg index 702d92ba..fb4dae79 100644 --- a/mini-lsm-book/src/lsm-tutorial/00-lsm-read-flow.svg +++ b/mini-lsm-book/src/lsm-tutorial/00-lsm-read-flow.svg @@ -1,6 +1,6 @@ - + @@ -18,7 +18,7 @@ - + 00-lsm-read-flow diff --git a/mini-lsm-book/src/lsm-tutorial/00-lsm-write-flow.svg b/mini-lsm-book/src/lsm-tutorial/00-lsm-write-flow.svg index 4977cc7c..322b1fab 100644 --- a/mini-lsm-book/src/lsm-tutorial/00-lsm-write-flow.svg +++ b/mini-lsm-book/src/lsm-tutorial/00-lsm-write-flow.svg @@ -1,6 +1,6 @@ - + @@ -13,7 +13,7 @@ - + 00-lsm-write-flow diff --git a/mini-lsm-book/src/lsm-tutorial/week1-01-overview.svg b/mini-lsm-book/src/lsm-tutorial/week1-01-overview.svg index 795ad090..54e32389 100644 --- a/mini-lsm-book/src/lsm-tutorial/week1-01-overview.svg +++ b/mini-lsm-book/src/lsm-tutorial/week1-01-overview.svg @@ -1,6 +1,6 @@ - + @@ -8,7 +8,7 @@ - + week1-01-overview diff --git a/mini-lsm-book/src/lsm-tutorial/week1-02-overview.svg b/mini-lsm-book/src/lsm-tutorial/week1-02-overview.svg index d6eaad17..b970b0db 100644 --- a/mini-lsm-book/src/lsm-tutorial/week1-02-overview.svg +++ b/mini-lsm-book/src/lsm-tutorial/week1-02-overview.svg @@ -1,6 +1,6 @@ - + @@ -8,78 +8,14 @@ - + week1-02-overview - + Layer 1 - - - - - - - - - SST - - - - - L0 - - - - - - - SST - - - - - - - SST - - - - - L1 - - - - - - - SST - - - - - - - SST - - - - - Ln - - - - - - - SST - - - - - - - SST - + + + @@ -125,144 +61,12 @@ key + value - - - - - - - - Data - Block - - - - - - - Data - Block - - - - - - - Data - Block - - - - - - - Data - Block - - - - - - - Data - Block - - - - - - - Index - - - - - - - - - - - - - Key - - - - - - - Value - - - - - - - Key - - - - - - - Value - - - - - - - Key - - - - - - - Value - - - - - - - Key - - - - - - - Value - - - - - - - Key - - - - - - - Value - - - - - - - - - - - Day 2: Block Encoding + + + Day 2: Merge Iterators diff --git a/mini-lsm-book/src/lsm-tutorial/week1-03-overview.svg b/mini-lsm-book/src/lsm-tutorial/week1-03-overview.svg index e7aaeb4d..cd10e376 100644 --- a/mini-lsm-book/src/lsm-tutorial/week1-03-overview.svg +++ b/mini-lsm-book/src/lsm-tutorial/week1-03-overview.svg @@ -1,6 +1,6 @@ - + @@ -8,19 +8,14 @@ - + week1-03-overview - - + + Layer 1 - - - - - - - Day 3: SST Encoding - + + + @@ -138,49 +133,49 @@ - - - Data - Block + + + Data + Block - - - Data - Block + + + Data + Block - - - Data - Block + + + Data + Block - - - Data - Block + + + Data + Block - - - Data - Block + + + Data + Block - - - Index + + + Index @@ -265,6 +260,11 @@ + + + Day 3: Block Encoding + + diff --git a/mini-lsm-book/src/lsm-tutorial/week1-04-overview.svg b/mini-lsm-book/src/lsm-tutorial/week1-04-overview.svg index 9867ce0f..539849fc 100644 --- a/mini-lsm-book/src/lsm-tutorial/week1-04-overview.svg +++ b/mini-lsm-book/src/lsm-tutorial/week1-04-overview.svg @@ -1,6 +1,6 @@ - + @@ -8,25 +8,82 @@ - + week1-04-overview - - + + Layer 1 - - - + + + + + + + Day 4: SST Encoding + + + + + + + SST + - - L0 + + L0 + + + + + + + SST + + + + + + + SST + + + + + L1 + + + + + + + SST + + + + + + + SST + + + + + Ln - - - - SST + + + + SST + + + + + + + SST @@ -74,38 +131,140 @@ - + - - - Day 4+5+6: Storage Engine - Merge Iterators + Read + Write Path + + + + + Data + Block + + + + + + + Data + Block + + + + + + + Data + Block + + + + + + + Data + Block + + + + + + + Data + Block + + + + + + + Index + + + + + + + + + + + + + Key - - - - - SST + + + + + Value - - - - - SST + + + + + Key - - - - - SST + + + + + Value + + + + + Key + + + + + + + Value + + + + + + + Key + + + + + + + Value + + + + + + + Key + + + + + + + Value + + + + + + + + diff --git a/mini-lsm-book/src/lsm-tutorial/week1-05-overview.svg b/mini-lsm-book/src/lsm-tutorial/week1-05-overview.svg new file mode 100644 index 00000000..7130e55a --- /dev/null +++ b/mini-lsm-book/src/lsm-tutorial/week1-05-overview.svg @@ -0,0 +1,111 @@ + + + + + + + + + + + + week1-05-overview + + + Layer 1 + + + + + + + L0 + + + + + + + SST + + + + + + + + On Disk + + + + + In Memory + + + + + + + Mem + Table + + + + + + + Mem + Table + + + + + + + Mem + Table + + + + + + + key + value + + + + + + + + + + + Day 5+6: Storage Engine + Read + Write Path + + + + + + + SST + + + + + + + SST + + + + + + + SST + + + + + diff --git a/mini-lsm-book/src/lsm-tutorial/week1-07-overview.svg b/mini-lsm-book/src/lsm-tutorial/week1-07-overview.svg index 8603609f..cdf37b33 100644 --- a/mini-lsm-book/src/lsm-tutorial/week1-07-overview.svg +++ b/mini-lsm-book/src/lsm-tutorial/week1-07-overview.svg @@ -1,6 +1,6 @@ - + @@ -8,10 +8,10 @@ - + week1-07-overview - + Layer 1 diff --git a/mini-lsm-book/src/lsm-tutorial/week1-overview.svg b/mini-lsm-book/src/lsm-tutorial/week1-overview.svg index 7a44b5c3..6f8bf4ca 100644 --- a/mini-lsm-book/src/lsm-tutorial/week1-overview.svg +++ b/mini-lsm-book/src/lsm-tutorial/week1-overview.svg @@ -1,6 +1,6 @@ - + @@ -13,7 +13,7 @@ - + week1-overview @@ -32,7 +32,7 @@ - Day 3: SST Encoding + Day 4: SST Encoding @@ -297,7 +297,7 @@ - Day 2: Block Encoding + Day 3: Block Encoding @@ -308,13 +308,13 @@ - - Day 1: Memtables + + Day 1+2: Memtables - - Day 4+5+6: Storage Engine + + Day 5+6: Storage Engine diff --git a/mini-lsm-book/src/lsm-tutorial/week2-01-overview.svg b/mini-lsm-book/src/lsm-tutorial/week2-01-overview.svg index ecfb2d00..d44469e9 100644 --- a/mini-lsm-book/src/lsm-tutorial/week2-01-overview.svg +++ b/mini-lsm-book/src/lsm-tutorial/week2-01-overview.svg @@ -1,6 +1,6 @@ - + @@ -8,7 +8,7 @@ - + week2-01-overview diff --git a/mini-lsm-book/src/lsm-tutorial/week2-05-overview.svg b/mini-lsm-book/src/lsm-tutorial/week2-05-overview.svg index d31e0dc6..c3c5df7a 100644 --- a/mini-lsm-book/src/lsm-tutorial/week2-05-overview.svg +++ b/mini-lsm-book/src/lsm-tutorial/week2-05-overview.svg @@ -1,6 +1,6 @@ - + @@ -13,10 +13,10 @@ - + week2-05-overview - + Layer 1 diff --git a/mini-lsm-book/src/lsm-tutorial/week2-06-overview.svg b/mini-lsm-book/src/lsm-tutorial/week2-06-overview.svg index ea47ee3e..f6a57227 100644 --- a/mini-lsm-book/src/lsm-tutorial/week2-06-overview.svg +++ b/mini-lsm-book/src/lsm-tutorial/week2-06-overview.svg @@ -1,6 +1,6 @@ - + @@ -8,10 +8,10 @@ - + week2-06-overview - + Layer 1 diff --git a/mini-lsm-book/src/lsm-tutorial/week2-overview.svg b/mini-lsm-book/src/lsm-tutorial/week2-overview.svg index 090fbcaf..8c4a0dc5 100644 --- a/mini-lsm-book/src/lsm-tutorial/week2-overview.svg +++ b/mini-lsm-book/src/lsm-tutorial/week2-overview.svg @@ -1,6 +1,6 @@ - + @@ -13,7 +13,7 @@ - + week2-overview diff --git a/mini-lsm-book/src/week1-02-block.md b/mini-lsm-book/src/week1-02-merge-iterator.md similarity index 77% rename from mini-lsm-book/src/week1-02-block.md rename to mini-lsm-book/src/week1-02-merge-iterator.md index 5879d3db..aac9faab 100644 --- a/mini-lsm-book/src/week1-02-block.md +++ b/mini-lsm-book/src/week1-02-merge-iterator.md @@ -1,3 +1,3 @@ -# Blocks +# Merge Iterator ![Chapter Overview](./lsm-tutorial/week1-02-overview.svg) diff --git a/mini-lsm-book/src/week1-03-sst.md b/mini-lsm-book/src/week1-03-block.md similarity index 67% rename from mini-lsm-book/src/week1-03-sst.md rename to mini-lsm-book/src/week1-03-block.md index 8ac9ca51..01fbdac9 100644 --- a/mini-lsm-book/src/week1-03-sst.md +++ b/mini-lsm-book/src/week1-03-block.md @@ -1,3 +1,3 @@ -# Sorted String Table (SST) +# Block ![Chapter Overview](./lsm-tutorial/week1-03-overview.svg) diff --git a/mini-lsm-book/src/week1-04-merge-iterator.md b/mini-lsm-book/src/week1-04-merge-iterator.md deleted file mode 100644 index 971aa18e..00000000 --- a/mini-lsm-book/src/week1-04-merge-iterator.md +++ /dev/null @@ -1,3 +0,0 @@ -# Merge Iterators - -![Chapter Overview](./lsm-tutorial/week1-04-overview.svg) diff --git a/mini-lsm-book/src/week1-04-sst.md b/mini-lsm-book/src/week1-04-sst.md new file mode 100644 index 00000000..f6827aea --- /dev/null +++ b/mini-lsm-book/src/week1-04-sst.md @@ -0,0 +1,3 @@ +# Sorted String Table (SST) + +![Chapter Overview](./lsm-tutorial/week1-04-overview.svg) \ No newline at end of file diff --git a/mini-lsm-book/src/week1-05-read-path.md b/mini-lsm-book/src/week1-05-read-path.md index fb8108be..9b13175e 100644 --- a/mini-lsm-book/src/week1-05-read-path.md +++ b/mini-lsm-book/src/week1-05-read-path.md @@ -1,3 +1,3 @@ # Read Path -![Chapter Overview](./lsm-tutorial/week1-04-overview.svg) +![Chapter Overview](./lsm-tutorial/week1-05-overview.svg) diff --git a/mini-lsm-book/src/week1-06-write-path.md b/mini-lsm-book/src/week1-06-write-path.md index 10aeacb1..2bdbc160 100644 --- a/mini-lsm-book/src/week1-06-write-path.md +++ b/mini-lsm-book/src/week1-06-write-path.md @@ -1,3 +1,3 @@ # Write Path -![Chapter Overview](./lsm-tutorial/week1-04-overview.svg) +![Chapter Overview](./lsm-tutorial/week1-05-overview.svg) \ No newline at end of file