知识卡片

普通读书笔记卡 · 10295.a.1.a.4.c · 生成模型:未记录

页校验如何定位损坏

理解等级:中级

写页时计算内容校验并和该页一起保存;读回后复算,结果不同说明不能信任读到的内容。整文件校验要读取大量当前查询无关的数据,按页校验可以在随机读取时验证并定位故障。简单累加或奇偶校验会漏过某些多位错误,CRC 可识别一定范围的突发误差;需要验证来自可信来源的内容时,要配合密码学认证机制。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    参考来源

    - 位置:《Database Internals》Chapter 3. File Formats(book-source:extracted/Database Internals A deep-dive into how distributed data systems work (Alex Petrov)/_epub-src/OEBPS/ch03.html#idm46104533049944,段 138) - 结论依据:原文说明页级校验为什么适合局部读取与局部定位,前文区分简单校验和 CRC。 - 原始内容:Since computing a checksum over the whole file is often impractical and it is unlikely we’re going to read the entire content every time we access it, page checksums are usually computed on pages and placed in the page header.