2024-01-19 12:00:36 +08:00
|
|
|
# Write Path
|
|
|
|
|
|
2024-01-20 11:55:10 +08:00
|
|
|

|
|
|
|
|
|
|
|
|
|
In this chapter, you will:
|
|
|
|
|
|
|
|
|
|
* Implement the LSM write path with L0 flush.
|
|
|
|
|
* Implement the logic to correctly update the LSM state.
|
|
|
|
|
|
2024-01-21 14:47:20 +08:00
|
|
|
|
|
|
|
|
To copy the test cases into the starter code and run them,
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
cargo x copy-test --week 1 --day 6
|
|
|
|
|
cargo x scheck
|
|
|
|
|
```
|
|
|
|
|
|
2024-01-20 11:55:10 +08:00
|
|
|
## Task 1: Flush Memtable to SST
|
|
|
|
|
|
|
|
|
|
## Task 2: Update the LSM State
|
2024-01-20 12:05:57 +08:00
|
|
|
|
2024-01-21 00:45:10 +08:00
|
|
|
## Task 3: Filter the SSTs
|
2024-01-20 19:27:36 +08:00
|
|
|
|
2024-01-21 15:26:22 +08:00
|
|
|
## Test Your Understanding
|
|
|
|
|
|
|
|
|
|
* What happens if a user requests to delete a key twice?
|
|
|
|
|
|
|
|
|
|
We do not provide reference answers to the questions, and feel free to discuss about them in the Discord community.
|
|
|
|
|
|
2024-01-20 12:05:57 +08:00
|
|
|
{{#include copyright.md}}
|