知识卡片
Bitcask用内存索引直达值
数据按写入次序直接追加,keydir 哈希表只记录各键最新位置,点读无需合并。压实扫描日志,保留 keydir 仍指向的记录并更新迁移指针;重启要由日志重建索引。日志本身就是持久存储,无须额外 WAL,但全键索引占内存,结构不适合有序范围查询。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Chapter 7. Log-Structured Storage Unordered LSM Storage · 查看原书依据
To make values searchable, Bitcask uses a data structure called keydir, which holds references to the latest data records for the corresponding keys. Old data records may still be present on disk, but are not referenced from
参考来源
- 位置:《Database Internals》Chapter 7. Log-Structured Storage(book-source:extracted/Database Internals A deep-dive into how distributed data systems work (Alex Petrov)/_epub-src/OEBPS/ch07.html#bitcask,段 226)
- 结论依据:第 225–233 段说明 keydir、查询、启动重建与维护。
- 原始内容:To make values searchable, Bitcask uses a data structure called keydir, which holds references to the latest data records for the corresponding keys. Old data records may still be present on disk, but are not referenced from