feat(wal): implement segment rotation, recovery scanner, and record parser
- wal/segment_manager.go: segment lifecycle with rotation at batch boundaries - wal/scanner.go: segment discovery, ordering, and continuity validation - wal/record_parser.go: block-level physical record parsing with tail corruption detection - 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:43:11.052Z",
|
||||
"updated_at": "2026-06-12T05:49:50.501Z",
|
||||
"session_ids": [
|
||||
"opencode:ses_145c3bae9ffeTB2zbsTym0Cev8"
|
||||
],
|
||||
@@ -81,6 +81,19 @@
|
||||
"status": "completed",
|
||||
"ended_at": "2026-06-12T05:43:11.052Z",
|
||||
"elapsed_ms": 32768
|
||||
},
|
||||
"todo:11": {
|
||||
"task_key": "todo:11",
|
||||
"task_label": "11",
|
||||
"task_title": "Segment rotation + durable-ready protocol",
|
||||
"session_id": "opencode:ses_145a44184ffeEK5zu36ABE7jHM",
|
||||
"agent": "Sisyphus-Junior",
|
||||
"category": "unspecified-high",
|
||||
"updated_at": "2026-06-12T05:49:50.501Z",
|
||||
"started_at": "2026-06-12T05:48:04.491Z",
|
||||
"status": "completed",
|
||||
"ended_at": "2026-06-12T05:49:50.501Z",
|
||||
"elapsed_ms": 106010
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -88,7 +101,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:43:11.052Z",
|
||||
"updated_at": "2026-06-12T05:49:50.501Z",
|
||||
"session_ids": [
|
||||
"opencode:ses_145c3bae9ffeTB2zbsTym0Cev8"
|
||||
],
|
||||
@@ -161,6 +174,19 @@
|
||||
"status": "completed",
|
||||
"ended_at": "2026-06-12T05:43:11.052Z",
|
||||
"elapsed_ms": 32768
|
||||
},
|
||||
"todo:11": {
|
||||
"task_key": "todo:11",
|
||||
"task_label": "11",
|
||||
"task_title": "Segment rotation + durable-ready protocol",
|
||||
"session_id": "opencode:ses_145a44184ffeEK5zu36ABE7jHM",
|
||||
"agent": "Sisyphus-Junior",
|
||||
"category": "unspecified-high",
|
||||
"updated_at": "2026-06-12T05:49:50.501Z",
|
||||
"started_at": "2026-06-12T05:48:04.491Z",
|
||||
"status": "completed",
|
||||
"ended_at": "2026-06-12T05:49:50.501Z",
|
||||
"elapsed_ms": 106010
|
||||
}
|
||||
},
|
||||
"agent": "atlas"
|
||||
|
||||
@@ -891,7 +891,7 @@ Max Concurrent: 6 (Wave 1b)
|
||||
**Commit**: YES (with Task 11)
|
||||
- Message: `feat(wal): implement segment writer with rotation`
|
||||
|
||||
- [ ] 11. Segment rotation + durable-ready protocol
|
||||
- [x] 11. Segment rotation + durable-ready protocol
|
||||
|
||||
**What to do**:
|
||||
- 创建 `wal/segment_manager.go`:管理 segment 的轮转和生命周期
|
||||
@@ -1180,7 +1180,7 @@ Max Concurrent: 6 (Wave 1b)
|
||||
**Commit**: YES
|
||||
- Message: `feat(memtable): integrate arena+skiplist with publish/abort`
|
||||
|
||||
- [ ] 15. WAL recovery: scanner + record parser
|
||||
- [x] 15. WAL recovery: scanner + record parser
|
||||
|
||||
**What to do**:
|
||||
- 创建 `wal/scanner.go`:`SegmentScanner` — 从 WAL 目录扫描 segment 文件
|
||||
|
||||
Reference in New Issue
Block a user