GATE / CS ARCHIVE

GATE CSE 2025 SET 1 / QUESTION 15

Tracing a cascading transaction rollback

Database Management Systems · Recovery & Logging · Full GATE CSE 2025 Set 1 paper

GATE 2025 Set 1, Q15 1 mark · MCQ
Report issue

Recovery & Logging

Question 15, GATE 2025: A database schedule is R1(X), W1(Y), R2(X), R2(Y), R3(Y), followed by ABORT(T1). No intervening commit or write is shown. Which other transactions must roll back? A only T2; B only T3; C both T2 and T3; D neither.
Tap to enlarge
Your answer
Answer & solution

Official answer: C

Step through it (8 steps)

Approach: Track reads of a value produced by an uncommitted transaction; read-read overlap alone is not a rollback dependency.
W1(Y) installs T1’s new value of Y. R2(Y) occurs after that write and before T1 commits, so T2 reads an uncommitted value from T1. R3(Y) sees the same value because no intervening write to Y is shown; T3 also depends on T1.
When T1 aborts, its write to Y must be undone. Both dependent transactions have computed using a value that cannot be retained, so both must roll back. This is a cascading rollback and gives C.
The reads R1(X) and R2(X) do not establish a dirty-read dependency because neither transaction writes X in this schedule. The important issue is which transaction produced the value read, not simply whether two transactions access the same data item.

Original paper, page 15 · Answer key