2024-01-26 16:59:03 +08:00
|
|
|
# Snapshot Read - Memtables and SSTs
|
2024-01-28 14:08:08 +08:00
|
|
|
|
|
|
|
|
During the refactor, you might need to change the signature of some functions from `&self` to `self: &Arc<Self>` as necessary.
|
2024-01-28 15:17:53 +08:00
|
|
|
|
2024-01-28 16:01:40 +08:00
|
|
|
## Task 1: MemTable, Write-Ahead Log, and Read Path
|
2024-01-28 15:17:53 +08:00
|
|
|
|
2024-01-28 16:01:40 +08:00
|
|
|
Memtable store timestamp, change to scan, encode ts in wal
|
|
|
|
|
|
|
|
|
|
## Task 2: Write Path
|
|
|
|
|
|
|
|
|
|
assign mvcc object, take write lock, increase ts by 1
|
|
|
|
|
|
|
|
|
|
## Task 3: MVCC Compaction
|
|
|
|
|
|
|
|
|
|
keep all versions
|
|
|
|
|
|
|
|
|
|
## Task 4: LSM Iterator
|
|
|
|
|
|
|
|
|
|
return the latest version
|