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:
dailz
2026-06-12 13:34:02 +08:00
parent fede839eb6
commit 3c0e3b14ff
4 changed files with 407 additions and 3 deletions
+1 -1
View File
@@ -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` 结构体