CS FundamentalsVery hardGATE CS (PYQ pattern)

Schedule (no commits yet): W1(A), R2(A), W2(B), R3(B), R4(C), W3(C), R5(D), W4(D). T1 now aborts. Which set of transactions must also be rolled back to avoid a non-recoverable state (cascading abort through reads-from dependencies, counting each dependent transaction that read data written, directly or transitively, by an aborted one)?

  1. A. T1, T2, T3
  2. B. T1, T2
  3. C. T1, T2, T3, T4
  4. D. T1, T2, T3, T5

Correct answer: A. T1, T2, T3

R2(A) reads T1's write, so T2 aborts; R3(B) reads T2's write, so T3 aborts. R4(C) comes BEFORE W3(C), so T4 read the initial C and is unaffected, and T5 reads D before W4(D). Hence T1, T2, T3 (the aborted T1 included).

More DBMS and SQL questions

Exams that ask this topic