Recovery: The UNDO Phase
ToUndo={ l | l a lastLSN of a “loser” Xact}
Repeat:
- Choose largest LSN among ToUndo.
- If this LSN is a CLR and undonextLSN==NULL
- Write an End record for this Xact.
- If this LSN is a CLR, and undonextLSN != NULL
- Add undonextLSN to ToUndo
- Else this LSN is an update. Undo the update, write a CLR, add prevLSN to ToUndo.