redbookcover.gif (13955 bytes) Readings in Database Systems, 3rd Edition

Stonebraker & Hellerstein, eds.

Recovery: The UNDO Phase

ToUndo={ l | l a lastLSN of a “loser” Xact}


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
(Q: what happens to other CLRs?)
Else this LSN is an update. Undo the update, write a CLR, add prevLSN to ToUndo.

Until ToUndo is empty.

Previous slide Next slide Back to first slide View graphic version

1998, Joseph M. Hellerstein.  Last modified 08/17/98.
Feedback welcomed.