为什么在数据库管理恢复中,白羊座在撤消之前要执行重做? [英] Why does Aries perform a redo before undo in database management recovery?

查看:192
本文介绍了为什么在数据库管理恢复中,白羊座在撤消之前要执行重做?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果Aries算法已经知道在分析阶段之后要撤消哪些事务,为什么为什么要在撤消之前应用重做?

Why does Aries algorithm apply a redo before an undo if it already knows what transactions to undo after the analysis phase?

我知道(认为)这与Lsn数和保持一致性有关,在某种意义上,鉴于磁盘上已刷新的数据,撤销事务可能与崩溃时撤销事务不同(由于页面脏了),但我找不到该问题的任何形式的正式"答案(至少我能理解的一个答案).

I know(think) it has something to do with the Lsn numbers and maintaining consistency in the sense that undoing a transaction given that the data flushed on disk may not be the same as undoing a transaction at the time of the crash (due to dirty pages), but I can't find any sort of 'formal' answer to this question (at least one that I can understand).

推荐答案

因为即使提交了事务,缓冲区上也会有未刷新的页面. ARIES在缓冲区管理器中使用 no-force .重做会使事务表和脏页表进入崩溃时的状态.结果,成功的交易可以反映到稳定的存储中.

Because there may be unflushed pages on the buffer even if a transaction is committed. ARIES uses no-force in the buffer manager. Redoing brings the transaction table and dirty page table to the state that was at the time of the crash. As a result, successful transactions can be reflected to the stable storage.

这篇关于为什么在数据库管理恢复中,白羊座在撤消之前要执行重做?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆