Skip to content

Commit

Permalink
Fix typos in W3D5 writeup and code (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
yyin-dev committed Mar 24, 2024
1 parent 621d7a8 commit afe6c95
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion mini-lsm-book/src/week3-05-txn-occ.md
Original file line number Diff line number Diff line change
Expand Up @@ -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<TxnLocalIterator, FusedIterator<LsmIterator>>` 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<TxnLocalIterator, FusedIterator<LsmIterator>>` 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

Expand Down
2 changes: 1 addition & 1 deletion mini-lsm-mvcc/src/mvcc/txn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ type SkipMapRangeIter<'a> =
pub struct TxnLocalIterator {
/// Stores a reference to the skipmap.
map: Arc<SkipMap<Bytes, Bytes>>,
/// 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>,
Expand Down
2 changes: 1 addition & 1 deletion mini-lsm-starter/src/mvcc/txn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ type SkipMapRangeIter<'a> =
pub struct TxnLocalIterator {
/// Stores a reference to the skipmap.
map: Arc<SkipMap<Bytes, Bytes>>,
/// 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>,
Expand Down

0 comments on commit afe6c95

Please sign in to comment.