知识卡片
页头与魔数
页头让读取器在遍历单元之前知道页类型、单元数、空闲空间边界和布局版本。有的实现还在页头持久化最右子页指针或页层级。魔数是一段约定的固定字节,例如 PAGE;读取预期偏移时核对这串值,可及早识别错位、非预期类型或格式版本。内容完整性需要另有校验。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Chapter 4. Implementing B-Trees Chapter 4. Implementing B-Trees · 查看原书依据
The page header holds information about the page that can be used for navigation, maintenance, and optimizations. It usually contains flags that describe page contents and layout, number of cells in the page, lower and upper
参考来源
- 位置:《Database Internals》Chapter 4. Implementing B-Trees(book-source:extracted/Database Internals A deep-dive into how distributed data systems work (Alex Petrov)/_epub-src/OEBPS/ch04.html#page_header,段 7)
- 结论依据:原文给出导航和维护所需的页头数据,后续用 PAGE 字节说明魔数识别。
- 原始内容:The page header holds information about the page that can be used for navigation, maintenance, and optimizations. It usually contains flags that describe page contents and layout, number of cells in the page, lower and upper