知识卡片

结构图卡 · 10294.a.1.a.1.c.1 · 生成模型:未记录

ARIES先重演再撤销

理解等级:高级

分析阶段找出潜在脏页和故障时尚未完成的事务。重做阶段重复历史,必要时连未提交操作也重做,以复原崩溃前状态;撤销阶段逆序回滚未完成事务,每次撤销用补偿日志记录进度,重启时可接续。这样既能补上已提交但没刷的页,又能去除提前刷盘的未提交修改。

参见 [[刷页策略决定撤销与重做]]。

结构图:

flowchart LR
  A[分析脏页和未结束事务] --> R[重做 重复故障前历史]
  R --> U[逆序撤销未完成事务]
  U --> C[记录补偿日志]
这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    参考来源

    - 位置:《Database Internals》Chapter 5. Transaction Processing and Recovery(book-source:extracted/Database Internals A deep-dive into how distributed data systems work (Alex Petrov)/_epub-src/OEBPS/ch05.html#idm46104532493848,段 129) - 结论依据:第 126–131 段描述三阶段及 CLR。 - 原始内容:The redo phase repeats the history up to the point of a crash and restores the database to the previous state. This phase is done for incomplete transactions as well as ones that were committed but whose