CS FundamentalsVery hardAmazon · Microsoft MCQ pattern
A Compensation Log Record (CLR) in ARIES, written while undoing a transaction's update, includes a field pointing to the next log record to undo (skipping over the just-undone one). What is the purpose of this field?
- A. It ensures that if the system crashes again during undo, recovery does not redo the undo operation itself or re-undo the same update twice, keeping the rollback process idempotent
- B. It stores the transaction's isolation level
- C. It is used only for deadlock detection, not recovery
- D. It has no functional purpose; it is only for audit logging
Correct answer: A. It ensures that if the system crashes again during undo, recovery does not redo the undo operation itself or re-undo the same update twice, keeping the rollback process idempotent
CLRs are themselves redone (never undone) during a future recovery's redo phase, and they explicitly record where undo should continue from next. This combination guarantees that even if a crash interrupts an in-progress rollback, a later recovery can resume undo at exactly the right point without repeating or skipping any step — redo-only, idempotent rollback.
More DBMS and SQL questions
- Write-ahead logging (WAL) requires that:
- A fuzzy checkpoint in ARIES records the set of active (dirty) transactions and dirty pages at checkpoint time WITHOUT forcing all dirty…
- Strict two-phase locking (Strict 2PL) differs from basic 2PL in which way?
- Rigorous two-phase locking (Rigorous 2PL) goes one step further than Strict 2PL. What extra guarantee does it add?
- Multiple Granularity Locking uses intention locks (IS, IX, SIX) on coarser objects like a table, in addition to ordinary shared/exclusive…
- A foreign key column is declared ON DELETE CASCADE. If the referenced (parent) row is deleted, what happens to the child rows referencing…