feat(wal,memtable): implement segment writer, block writer, and MemTable

- wal/block_writer.go: 32KB block buffer with padding and flush
- wal/segment_writer.go: WAL segment file with durable-ready protocol
- memtable/memtable.go: Arena+SkipList wrapper with publish/abort semantics
- Comprehensive tests for all modules, all pass with -race
This commit is contained in:
dailz
2026-06-12 13:43:24 +08:00
parent 3c0e3b14ff
commit 349063968b
8 changed files with 1407 additions and 4 deletions
+2 -2
View File
@@ -823,7 +823,7 @@ Max Concurrent: 6 (Wave 1b)
**Commit**: YES (group with Task 6)
- [ ] 10. Segment writer (file write + block writer)
- [x] 10. Segment writer (file write + block writer)
**What to do**:
- 创建 `wal/block_writer.go``BlockWriter` — 管理 32KB block 的 Physical Record 写入
@@ -1105,7 +1105,7 @@ Max Concurrent: 6 (Wave 1b)
**Commit**: YES (with Task 12)
- Message: `feat(wal): implement WAL writer with group commit`
- [ ] 14. MemTable (wrap skiplist + arena + publish/abort)
- [x] 14. MemTable (wrap skiplist + arena + publish/abort)
**What to do**:
- 创建 `memtable/memtable.go``MemTable` 结构体