From 5ca47c67568a287f5f0652cf4334d2254c01a514 Mon Sep 17 00:00:00 2001 From: Alex Chi Date: Sun, 25 Dec 2022 12:33:35 -0500 Subject: [PATCH] fix(docs): typo in part 3 Signed-off-by: Alex Chi --- mini-lsm-book/src/03-memtable.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/mini-lsm-book/src/03-memtable.md b/mini-lsm-book/src/03-memtable.md index 42cc99d..3bd7123 100644 --- a/mini-lsm-book/src/03-memtable.md +++ b/mini-lsm-book/src/03-memtable.md @@ -88,6 +88,9 @@ In this design, you might have noticed that as long as we have the iterator obje the memory. In this tutorial, we assume user operations are short, so that this will not cause big problems. See extra task for possible improvements. +You can also consider using [AgateDB's skiplist](https://github.com/tikv/agatedb/tree/master/skiplist) implementation, +which avoids the problem of creating a self-referential struct. + ## Task 3 - Merge Iterator Now that you have a lot of mem-tables and SSTs, you might want to merge them to get the latest occurence of a key. @@ -139,5 +142,6 @@ common optimization in LSM storage engines. engine. You might find some lifetime related problems and need to workaround them. * Foreground iterator. In this tutorial we assumed that all operations are short, so that we can hold reference to mem-table in the iterator. If an iterator is held by users for a long time, the whole mem-table (which might be 256MB) - will not stay in the memory. To solve this, we can provide a `ForegroundIterator` / `LongIterator` to our user. The - iterator will periodically create new underlying storage iterator so as to allow garbage collection of the resources. + will stay in the memory even if it has been flushed to disk. To solve this, we can provide a `ForegroundIterator` / + `LongIterator` to our user. The iterator will periodically create new underlying storage iterator so as to allow + garbage collection of the resources.