@@ -5,6 +5,15 @@ In this chapter, you will:
|
|||||||
* Refactor your implementation to use key+ts representation.
|
* Refactor your implementation to use key+ts representation.
|
||||||
* Make your code compile with the new key representation.
|
* Make your code compile with the new key representation.
|
||||||
|
|
||||||
|
To run test cases,
|
||||||
|
|
||||||
|
```
|
||||||
|
cargo x copy-test --week 3 --day 1
|
||||||
|
cargo x scheck
|
||||||
|
```
|
||||||
|
|
||||||
|
**Note: We do not have full unit tests for this chapter. All you need to do is to make your code compile.**
|
||||||
|
|
||||||
## Task 0: Use MVCC Key Encoding
|
## Task 0: Use MVCC Key Encoding
|
||||||
|
|
||||||
You will need to replace the key encoding module to the MVCC one. We have removed some interfaces from the original key module and implemented new comparators for the keys. If you followed the instructions in the previous chapters and did not use `into_inner` on the key, you should pass all test cases on day 3 after all the refactors. Otherwise, you will need to look carefully on the places where you only compare the keys without looking at the timestamps.
|
You will need to replace the key encoding module to the MVCC one. We have removed some interfaces from the original key module and implemented new comparators for the keys. If you followed the instructions in the previous chapters and did not use `into_inner` on the key, you should pass all test cases on day 3 after all the refactors. Otherwise, you will need to look carefully on the places where you only compare the keys without looking at the timestamps.
|
||||||
|
|||||||
@@ -9,6 +9,15 @@ In this chapter, you will:
|
|||||||
|
|
||||||
During the refactor, you might need to change the signature of some functions from `&self` to `self: &Arc<Self>` as necessary.
|
During the refactor, you might need to change the signature of some functions from `&self` to `self: &Arc<Self>` as necessary.
|
||||||
|
|
||||||
|
To run test cases,
|
||||||
|
|
||||||
|
```
|
||||||
|
cargo x copy-test --week 3 --day 2
|
||||||
|
cargo x scheck
|
||||||
|
```
|
||||||
|
|
||||||
|
**Note: You will also need to pass everything <= 2.4 after finishing this chapter.**
|
||||||
|
|
||||||
## Task 1: MemTable, Write-Ahead Log, and Read Path
|
## Task 1: MemTable, Write-Ahead Log, and Read Path
|
||||||
|
|
||||||
In this task, you will need to modify:
|
In this task, you will need to modify:
|
||||||
|
|||||||
@@ -10,6 +10,15 @@ At the end of the day, your engine will be able to give the user a consistent vi
|
|||||||
|
|
||||||
During the refactor, you might need to change the signature of some functions from `&self` to `self: &Arc<Self>` as necessary.
|
During the refactor, you might need to change the signature of some functions from `&self` to `self: &Arc<Self>` as necessary.
|
||||||
|
|
||||||
|
To run test cases,
|
||||||
|
|
||||||
|
```
|
||||||
|
cargo x copy-test --week 3 --day 3
|
||||||
|
cargo x scheck
|
||||||
|
```
|
||||||
|
|
||||||
|
**Note: You will also need to pass test cases for 2.5 and 2.6 after finishing this chapter.**
|
||||||
|
|
||||||
## Task 1: LSM Iterator with Read Timestamp
|
## Task 1: LSM Iterator with Read Timestamp
|
||||||
|
|
||||||
The goal of this chapter is to have something like:
|
The goal of this chapter is to have something like:
|
||||||
|
|||||||
@@ -2,6 +2,13 @@
|
|||||||
|
|
||||||
In this chapter, you will implement necessary structures to track the lowest read timestamp being used by the user, and collect unused versions from SSTs when doing the compaction.
|
In this chapter, you will implement necessary structures to track the lowest read timestamp being used by the user, and collect unused versions from SSTs when doing the compaction.
|
||||||
|
|
||||||
|
To run test cases,
|
||||||
|
|
||||||
|
```
|
||||||
|
cargo x copy-test --week 3 --day 4
|
||||||
|
cargo x scheck
|
||||||
|
```
|
||||||
|
|
||||||
## Task 1: Implement Watermark
|
## Task 1: Implement Watermark
|
||||||
|
|
||||||
In this task, you will need to modify:
|
In this task, you will need to modify:
|
||||||
|
|||||||
Reference in New Issue
Block a user