Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion mini-lsm-book/src/week1-01-memtable.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,6 @@ Answer the correctness questions with reference to your implementation. For ques
* Does it make sense for a memtable to store every write instead of only the latest version of a key? For example, suppose a user writes `a -> 1`, `a -> 2`, and `a -> 3` to the same memtable.
* Why do we need a combination of `state` and `state_lock`? Can we only use `state.read()` and `state.write()`?
* Construct the smallest example in which probing memtables in the wrong order returns a stale value. Then construct one in which it resurrects a deleted value.
* After a memtable is frozen, could a thread that still holds an old LSM-state snapshot write to that now-immutable memtable? How does your solution prevent this?
* In several places, you might acquire a state read lock, release it, and then acquire a write lock. The two operations may occur in different functions that call one another. How does this differ from directly upgrading a read lock to a write lock? Is an upgrade necessary, and what does it cost?

### Performance and Design
Expand Down
1 change: 1 addition & 0 deletions mini-lsm-book/src/week1-06-write-path.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ After the tests pass, record the state before and after a manual flush: the muta
* What happens if a user requests to delete a key twice?
* Why must the state update verify that the memtable removed from `imm_memtables` has the ID used to build the SST?
* Construct an interleaving that would corrupt the state if two flushes selected the same oldest memtable without `state_lock`.
* Revisit the Day 1 freeze path: does your `put` hold the state read lock until the memtable write finishes? If it released the lock after saving the memtable `Arc`, could that write land after the memtable was frozen?
* For each combination of included, excluded, and unbounded scan bounds, state the condition under which an SST range can be safely excluded.

### Memory and Performance
Expand Down
Loading