Add (T1,20) to TT and (P1,20) to DPT
Add (T2,30) to TT and (P2,30) to DPT
Add (T3,40) to TT and (P3,40) to DPT
Change status of T2 to C
Change (T3,40) to (T3,60)
Remove T2 from TT
Change (T1,20) to (T1,70) and add (P5,70) to DPT
At the end of analysis, the transaction table contains the following entries: (T1,80),
and (T3,60). The Dirty Page Table has the following entries: (P1,20), (P2,30),
(P3,40), and (P5,80).
3. Redo starts from LSN20 (minimum recLSN in DPT).
Check whether P1 has pageLSN more than 10 or not. Since it is a
committed transaction, we probably need not redo this update.
Redo the change in P2
Redo the change in P3
Redo the changes on P2
Redo the changes on P5
4. ToUndo consists of (80, 60).
Undo the changes in P5. Append a CLR: Undo T1 LSN 80, set
undonextLSN = 20. Add 20 to ToUndo.
ToUndo consists of (60, 20).
Undo the changes on P2. Append a CLR: Undo T3 LSN 60, set
undonextLSN = 40. Add 40 to ToUndo.
ToUndo consists of (40, 20).