CS FundamentalsVery hardIBM · Deloitte pattern

Immediate-update recovery with a checkpoint. Log (oldest first): <T1 start>, <T1 commit>, <T2 start>, <checkpoint, active = {T2}>, <T3 start>, <T2 commit>, <T4 start>, <T3 commit>, crash. Which transactions are redone and which are undone?

  1. A. Redo T2, T3; undo T4
  2. B. Redo T1, T2, T3; undo T4
  3. C. Redo T2; undo T3, T4
  4. D. Redo T3; undo T2, T4

Correct answer: A. Redo T2, T3; undo T4

T1 committed before the checkpoint, so its changes are already on disk: ignore it. T2 and T3 committed after the checkpoint: redo. T4 never committed: undo. Redoing T1 is the common over-cautious answer.

More DBMS and SQL questions

Exams that ask this topic