7. Recovery Flashcards
Transaction Failure
- ___ erros - Ex: Interna errors
- ___ errors - Ex: Deadlock
Logical
System
System Failures
- ___ crash
- ___ Failure
System
Disk
Recovery from failures
- Transaction needs to be undone if log contains ___, but does not contain ___ or___
- Transaction needs to be redone if log contains ___, and contains ___ or___
Start / commit or abbort
Start / commit or abbort
Undo
Restores values of items updated by transaction to their ___ values and adds ___ to log
Older
Abort
Redo
Sets values of items updated by transaction to their ___ values and adds ___ to log
New
Nothing
Checkpoints
1- Output log from ___ to ___
2- Output all modified ___ to the ___
3- Write a chackpoint ___ to ___
RAM to stable storage
Bugger blocks to the disk
Log to stable storage
Recovery Algorithm
- ___ and ___ during normal operation
- Recovery from failure with two phases:
1. Redo phase: ___ updates of all transactions, whether they committed, aborted, or are incomplete
2. Undo phase: ___ all incomplete transactions
Logging and Transaction rollback
Replay
Undo
Log record buffering
Log records are buffered in ___, instead of being output directly to ___.
Main memory
Stable storage
ARIES
- Every log record has a ___ (log sequence number
- Every ___ (block) contains LSN of the most recent log record that ___ the page
- Each log record contains a ___ to the previous log record of the same ___
LSN
Page / changed
Pointer / transaction
Dirty page table
Contains one entry for each dirty ___ in the buffer that has a ___ (points to the first log record that made the page dirty)
Page
recLSN
Transaction table
Contains one entry for each ___ that has a ___ (points to the last log record of the transaction)
Active transaction
lastLSN
Checkpoints in ARIES
Writte ___ and ___ ( that has the contents of the dirty page table and transaction table)
begin_checkpoint
end_checkpoint
Recovery in ARIES
- ___: Identifies dirty pages in the buffer pool and active transactions at crash
- ___: Repeats all actions
- ___: Undoes the actions of transactions that did not commit
- Analysis
- Redo
- Undo
Compensation log record (CLR)
___ to the next action to be ___
Pointer
Undone