3. Log-based Recovery
Logging is the most popular mechanism for implementing recovery algorithms.
The recovery manager implements
- Commit - by writing a commit record to the log and flushing the log (satisfies the Redo Rule)
- Abort - by using the transaction’s log records to restore before-images
- Restart - by scanning the log and undoing and redoing operations as necessary
The algorithms are fast since they use sequential log I/O in place of random database I/O. They greatly affect TP and Restart performance.