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:
+28
-2
@@ -8,7 +8,7 @@
|
||||
"plan_name": "phase1-wal",
|
||||
"status": "active",
|
||||
"started_at": "2026-06-12T05:09:32.588Z",
|
||||
"updated_at": "2026-06-12T05:33:52.854Z",
|
||||
"updated_at": "2026-06-12T05:43:11.052Z",
|
||||
"session_ids": [
|
||||
"opencode:ses_145c3bae9ffeTB2zbsTym0Cev8"
|
||||
],
|
||||
@@ -68,6 +68,19 @@
|
||||
"status": "completed",
|
||||
"ended_at": "2026-06-12T05:33:52.854Z",
|
||||
"elapsed_ms": 64624
|
||||
},
|
||||
"todo:10": {
|
||||
"task_key": "todo:10",
|
||||
"task_label": "10",
|
||||
"task_title": "Segment writer (file write + block writer)",
|
||||
"session_id": "opencode:ses_145acc017ffe2fra67VT2L28LQ",
|
||||
"agent": "Sisyphus-Junior",
|
||||
"category": "unspecified-high",
|
||||
"updated_at": "2026-06-12T05:43:11.052Z",
|
||||
"started_at": "2026-06-12T05:42:38.284Z",
|
||||
"status": "completed",
|
||||
"ended_at": "2026-06-12T05:43:11.052Z",
|
||||
"elapsed_ms": 32768
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -75,7 +88,7 @@
|
||||
"active_plan": "/home/dailz/workspace/src/go-kv/.omo/plans/phase1-wal.md",
|
||||
"started_at": "2026-06-12T05:09:32.588Z",
|
||||
"status": "active",
|
||||
"updated_at": "2026-06-12T05:33:52.854Z",
|
||||
"updated_at": "2026-06-12T05:43:11.052Z",
|
||||
"session_ids": [
|
||||
"opencode:ses_145c3bae9ffeTB2zbsTym0Cev8"
|
||||
],
|
||||
@@ -135,6 +148,19 @@
|
||||
"status": "completed",
|
||||
"ended_at": "2026-06-12T05:33:52.854Z",
|
||||
"elapsed_ms": 64624
|
||||
},
|
||||
"todo:10": {
|
||||
"task_key": "todo:10",
|
||||
"task_label": "10",
|
||||
"task_title": "Segment writer (file write + block writer)",
|
||||
"session_id": "opencode:ses_145acc017ffe2fra67VT2L28LQ",
|
||||
"agent": "Sisyphus-Junior",
|
||||
"category": "unspecified-high",
|
||||
"updated_at": "2026-06-12T05:43:11.052Z",
|
||||
"started_at": "2026-06-12T05:42:38.284Z",
|
||||
"status": "completed",
|
||||
"ended_at": "2026-06-12T05:43:11.052Z",
|
||||
"elapsed_ms": 32768
|
||||
}
|
||||
},
|
||||
"agent": "atlas"
|
||||
|
||||
@@ -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` 结构体
|
||||
|
||||
Reference in New Issue
Block a user