feat(memtable): implement SkipList with lock-free reads
- memtable/skiplist.go: heap-backed SkipList with atomic.Pointer next pointers - Mutex-protected writes, lock-free reads with release/acquire ordering - Copy-on-insert and copy-on-return for key/value safety - Forward iterator that skips pending entries - Comprehensive tests: ordered insert, overwrite, pending hidden, concurrent -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:26:58.955Z",
|
||||
"updated_at": "2026-06-12T05:33:52.854Z",
|
||||
"session_ids": [
|
||||
"opencode:ses_145c3bae9ffeTB2zbsTym0Cev8"
|
||||
],
|
||||
@@ -55,6 +55,19 @@
|
||||
"status": "completed",
|
||||
"ended_at": "2026-06-12T05:26:58.955Z",
|
||||
"elapsed_ms": 15585
|
||||
},
|
||||
"todo:8": {
|
||||
"task_key": "todo:8",
|
||||
"task_label": "8",
|
||||
"task_title": "SkipList (mutex write + lock-free read)",
|
||||
"session_id": "opencode:ses_145b2e10affeQnDhHreILvKkkW",
|
||||
"agent": "Sisyphus-Junior",
|
||||
"category": "deep",
|
||||
"updated_at": "2026-06-12T05:33:52.854Z",
|
||||
"started_at": "2026-06-12T05:32:48.230Z",
|
||||
"status": "completed",
|
||||
"ended_at": "2026-06-12T05:33:52.854Z",
|
||||
"elapsed_ms": 64624
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -62,7 +75,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:26:58.955Z",
|
||||
"updated_at": "2026-06-12T05:33:52.854Z",
|
||||
"session_ids": [
|
||||
"opencode:ses_145c3bae9ffeTB2zbsTym0Cev8"
|
||||
],
|
||||
@@ -109,6 +122,19 @@
|
||||
"status": "completed",
|
||||
"ended_at": "2026-06-12T05:26:58.955Z",
|
||||
"elapsed_ms": 15585
|
||||
},
|
||||
"todo:8": {
|
||||
"task_key": "todo:8",
|
||||
"task_label": "8",
|
||||
"task_title": "SkipList (mutex write + lock-free read)",
|
||||
"session_id": "opencode:ses_145b2e10affeQnDhHreILvKkkW",
|
||||
"agent": "Sisyphus-Junior",
|
||||
"category": "deep",
|
||||
"updated_at": "2026-06-12T05:33:52.854Z",
|
||||
"started_at": "2026-06-12T05:32:48.230Z",
|
||||
"status": "completed",
|
||||
"ended_at": "2026-06-12T05:33:52.854Z",
|
||||
"elapsed_ms": 64624
|
||||
}
|
||||
},
|
||||
"agent": "atlas"
|
||||
|
||||
@@ -694,7 +694,7 @@ Max Concurrent: 6 (Wave 1b)
|
||||
**Commit**: YES (with Task 8)
|
||||
- Message: `feat(memtable): implement Arena allocator and SkipList`
|
||||
|
||||
- [ ] 8. SkipList (mutex write + lock-free read)
|
||||
- [x] 8. SkipList (mutex write + lock-free read)
|
||||
|
||||
**What to do**:
|
||||
- 创建 `memtable/skiplist.go`:`SkipList` 结构体
|
||||
|
||||
Reference in New Issue
Block a user