← 返回刚才阅读的位置

知识卡片

普通读书笔记卡 · 10406.c.2.b.2 · 生成模型:未记录

快照对应日志截断点

理解等级:中级

追加日志变长后,可以先把已执行命令写进状态快照,再回收对应的旧日志。快照必须和被裁掉的末尾位置一致,切换对恢复程序应是原子的,否则故障后可能既没有旧日志,又没有完整的新状态。

参见 [[稳定领导摊薄准备阶段]]。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • Chapter 14. Consensus Multi-Paxos 的稳态与恢复 · 查看原书依据

      To prevent a log from growing indefinitely large, its contents should be applied to the aforementioned structure. After the log contents are synchronized with a primary structure, creating a snapshot, the log can be truncated. Log and state snapshots should be mutually consistent, and snapshot changes should be

    参考来源

    - 位置:《Database Internals》Chapter 14. Consensus(book-source:extracted/Database Internals A deep-dive into how distributed data systems work (Alex Petrov)/_epub-src/OEBPS/ch14.html#multi_paxos,段 123) - 结论依据:原文明确快照和日志要相互一致,并要求快照变化与截断一起生效。 - 原始内容:To prevent a log from growing indefinitely large, its contents should be applied to the aforementioned structure. After the log contents are synchronized with a primary structure, creating a snapshot, the log can be truncated. Log and state snapshots should be mutually consistent, and snapshot changes should be