Author | Message |
---|---|
HelloWorld
Posts: 88
|
Posted 07:57 Aug 15, 2009 |
As it says in the class, and Undo/Redo recovery has 2 stages: Stage 1: Undo recovery Stage 2: Redo recovery So for example, if the Transaction is Undo-able, do we still need to go to the second stage (i.e. Redo it again)? Or leave it as Undo only? I think it make sense to stop as Undo because doing it twice would make it very inefficient in the worst case where all Transaction are Undo-able, but I'm not sure with this.. |
cysun
Posts: 2935
|
Posted 09:11 Aug 15, 2009 |
What do you mean "the Transaction is Undo-able"? Unless you know the changes by all the committed tranasctions were saved on disk (i.e. the Undo-Only Recovery Assumption), you must perform redo. If you can make the undo-only assumption, it means that you are doing undo-only logging, which is not good compared to undo/redo logging because commit statement must wait until all buffers are flushed to return. So the short answer is yes, you need to do Stage 2. |