Skip to content

Commit

Permalink
chore: typos & refine comments (#65)
Browse files Browse the repository at this point in the history
* typo in  week2-01-compaction.md

* chroe: typos & add comments

* chore: more typos

* Update week2-01-compaction.md

---------

Co-authored-by: Alex Chi Z <iskyzh@gmail.com>
  • Loading branch information
ben1009 and skyzh committed Mar 24, 2024
1 parent afad25b commit 621d7a8
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion mini-lsm-book/src/week2-01-compaction.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Because we always compact all SSTs, if we find multiple version of a key, we can

There are some things that you might need to think about.

* How does your implementation handle L0 flush in par with compaction? (Not taking the state lock when doing the compaction, and also need to consider new L0 files produced when compaction is going on.)
* How does your implementation handle L0 flush in parallel with compaction? (Not taking the state lock when doing the compaction, and also need to consider new L0 files produced when compaction is going on.)
* If your implementation removes the original SST files immediately after the compaction completes, will it cause problems in your system? (Generally no on macOS/Linux because the OS will not actually remove the file until no file handle is being held.)

## Task 2: Concat Iterator
Expand Down
2 changes: 1 addition & 1 deletion mini-lsm-book/src/week2-04-leveled.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ In addition, at most *one* level can have a positive target size below `base_lev
0 0 30MB 300MB 3GB 30GB
```

Notice in this case L1 and L2 have target size of 0, and L3 is the only level with a postive target size below `base_level_size_mb`.
Notice in this case L1 and L2 have target size of 0, and L3 is the only level with a positive target size below `base_level_size_mb`.

### Task 1.2: Decide Base Level

Expand Down
2 changes: 1 addition & 1 deletion mini-lsm-mvcc/src/block/iterator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pub struct BlockIterator {
block: Arc<Block>,
/// the current key at the iterator position
key: KeyVec,
/// the value range from the block
/// the current value range in the block.data, corresponds to the current key
value_range: (usize, usize),
/// the current index at the iterator position
idx: usize,
Expand Down
2 changes: 1 addition & 1 deletion mini-lsm-starter/src/block/iterator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pub struct BlockIterator {
block: Arc<Block>,
/// The current key, empty represents the iterator is invalid
key: KeyVec,
/// the value range from the block
/// the current value range in the block.data, corresponds to the current key
value_range: (usize, usize),
/// Current index of the key-value pair, should be in range of [0, num_of_elements)
idx: usize,
Expand Down
2 changes: 1 addition & 1 deletion mini-lsm/src/block/iterator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pub struct BlockIterator {
block: Arc<Block>,
/// the current key at the iterator position
key: KeyVec,
/// the value range from the block
/// the current value range in the block.data, corresponds to the current key
value_range: (usize, usize),
/// the current index at the iterator position
idx: usize,
Expand Down

0 comments on commit 621d7a8

Please sign in to comment.