From afe6c9549d5674a30c12305278028f1fef843096 Mon Sep 17 00:00:00 2001 From: Yue Yin <41224888+yyin-dev@users.noreply.github.com> Date: Sun, 24 Mar 2024 15:23:39 -0400 Subject: [PATCH] Fix typos in W3D5 writeup and code (#67) --- mini-lsm-book/src/week3-05-txn-occ.md | 2 +- mini-lsm-mvcc/src/mvcc/txn.rs | 2 +- mini-lsm-starter/src/mvcc/txn.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mini-lsm-book/src/week3-05-txn-occ.md b/mini-lsm-book/src/week3-05-txn-occ.md index ea5403a..0fbd610 100644 --- a/mini-lsm-book/src/week3-05-txn-occ.md +++ b/mini-lsm-book/src/week3-05-txn-occ.md @@ -27,7 +27,7 @@ In this task, you will need to modify: src/txn.rs ``` -For `get`, you should first probe the local storage. If a value is found, return the value or `None` depending on whether it is a deletion marker. For `scan`, you will need to implement a `TxnLocalIterator` for the skiplist as in chapter 1.1 when you implement the iterator for a memtable without key timestamp. You will need to store a `TwoMergeIterator>` in the `TxnLocalIterator`. And, lastly, given that the `TwoMergeIterator` will retain the deletion markers in the child iterators, you will need to modify your `TxnIterator` implementation to correctly handle deletions. +For `get`, you should first probe the local storage. If a value is found, return the value or `None` depending on whether it is a deletion marker. For `scan`, you will need to implement a `TxnLocalIterator` for the skiplist as in chapter 1.1 when you implement the iterator for a memtable without key timestamp. You will need to store a `TwoMergeIterator>` in the `TxnIterator`. And, lastly, given that the `TwoMergeIterator` will retain the deletion markers in the child iterators, you will need to modify your `TxnIterator` implementation to correctly handle deletions. ## Task 3: Commit diff --git a/mini-lsm-mvcc/src/mvcc/txn.rs b/mini-lsm-mvcc/src/mvcc/txn.rs index 7534bb0..49b28d9 100644 --- a/mini-lsm-mvcc/src/mvcc/txn.rs +++ b/mini-lsm-mvcc/src/mvcc/txn.rs @@ -179,7 +179,7 @@ type SkipMapRangeIter<'a> = pub struct TxnLocalIterator { /// Stores a reference to the skipmap. map: Arc>, - /// Stores a skipmap iterator that refers to the lifetime of `MemTableIterator` itself. + /// Stores a skipmap iterator that refers to the lifetime of `TxnLocalIterator` itself. #[borrows(map)] #[not_covariant] iter: SkipMapRangeIter<'this>, diff --git a/mini-lsm-starter/src/mvcc/txn.rs b/mini-lsm-starter/src/mvcc/txn.rs index 33ec6a0..9d6fba9 100644 --- a/mini-lsm-starter/src/mvcc/txn.rs +++ b/mini-lsm-starter/src/mvcc/txn.rs @@ -61,7 +61,7 @@ type SkipMapRangeIter<'a> = pub struct TxnLocalIterator { /// Stores a reference to the skipmap. map: Arc>, - /// Stores a skipmap iterator that refers to the lifetime of `MemTableIterator` itself. + /// Stores a skipmap iterator that refers to the lifetime of `TxnLocalIterator` itself. #[borrows(map)] #[not_covariant] iter: SkipMapRangeIter<'this>,