After a crash, committed work is replayed and uncommitted partial work is removed.
Circle one: True False
What is written first when a transaction changes data?
- The change to the data page
- The intention in the log
- The commit record
When is the commit record written?
- After every change of the transaction sits safely in the log
- Before anything is written anywhere
- Only during a checkpoint
Why must the log live on safe storage ahead of the pages?
- Logs are prettier than pages
- Pages cannot be written at all
- Pages can be lost in a crash while the log survives
The log ends mid-transaction with no commit record. What happens to its partial changes?
- They are replayed as if committed
- They are rolled back and removed
- They are left half written forever
What does a checkpoint do?
- Writes pending changes to pages and notes the spot in the log
- Deletes the entire log
- Commits every open transaction at once
A friend writes data pages first and the log afterwards. What breaks?
- Nothing, the order makes no difference
- Checkpoints become slightly slower
- A crash between the two leaves work that cannot be rebuilt
A log holds T1 with a commit record and T2 without one. What does recovery do?
- Redoes T1 step by step and undoes the partial T2
- Undoes both transactions fully
- Redoes both transactions fully