知识卡片
LMDB从映射页提供快照
LMDB 经内存映射直接读取页,使引擎无须另加应用级页缓存或物化副本。写沿根到叶创建新路径,两个轮换的根槽支持提交,旧读者所引用页延后回收。叶页缺少跨版本兄弟指针,顺序遍历需回到上层继续找下一个叶页。结构上的旧页本身就支持快照读。
参见 [[复制写以根切换发布]]。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Chapter 6. B-Tree Variants Chapter 6. B-Tree Variants · 查看原书依据
LMDB holds only two versions of the root node: the latest version, and the one where new changes are going to be committed. This is sufficient since all writes have to go through the root node.
参考来源
- 位置:《Database Internals》Chapter 6. B-Tree Variants(book-source:extracted/Database Internals A deep-dive into how distributed data systems work (Alex Petrov)/_epub-src/OEBPS/ch06.html#cow_lmdb,段 18)
- 结论依据:第 16–19 段说明 mmap、根版本、页复用和顺序遍历。
- 原始内容:LMDB holds only two versions of the root node: the latest version, and the one where new changes are going to be committed. This is sufficient since all writes have to go through the root node.