Abort, cont.
To perform UNDO, must have a lock on data!
Before restoring old value of a page, write a CLR:
- You continue logging while you UNDO!!
- CLR has one extra field: undonextLSN
- Points to the next LSN to undo (i.e. the prevLSN of the record we’re currently undoing).
- CLRs never Undone (but they might be Redone when repeating history: guarantees Atomicity!)
At end of UNDO, write an “end” log record.