Steal Force
Steal Force
CSE 444
Lectures 11-12
Transactions: Recovery (Aries)
• FORCE or NO-FORCE
– Should all updates of a transaction be forced to disk before the
transaction commits?
[Franklin97]
Magda Balazinska - CSE 444, Fall 2010 12
ARIES Data Structures
• Active Transactions Table
– Lists all running transactions (active transactions)
– For each txn: lastLSN = most recent update by transaction
• Dirty Page Table
– Lists all dirty pages
– For each dirty page: recoveryLSN (recLSN)= first LSN that
caused page to become dirty
• Write Ahead Log contains log records
– LSN, prevLSN = previous LSN for same transaction
– other attributes
After crash, log file = (22, 23, 24, 25, 26, 18, 19, 20, 21)
Where is the end of the log ? 18
• Approach
– Rebuild active transactions table and dirty pages table
– Reprocess the log from the beginning (or checkpoint)
• Only update the two data structures
– Compute: firstLSN = smallest of all recoveryLSN
firstLSN
Replay
Dirty pages history
Active
transactions