Example 20.9 Cascading rollback
Consider a schedule consisting of the three transactions shown in Figure 20.18, which con-forms to the two-phase locking protocol. Transaction T14 obtains an exclusive lock on balx then updates it using baly, which has been obtained with a shared lock, and writes the value of
balx back to the database before releasing the lock on balx. Transaction T15 then obtains an
exclusive lock on balx , reads the value of balx from the database, updates it, and writes the
new value back to the database before releasing the lock. Finally, T16 share locks bal x and reads it from the database. By now, T14 has failed and has been rolled back. However, since T15
is dependent on T14(it has read an item that has been updated by T14), T15 must also be rolled
back. Similarly, T16 is dependent on T15, so it too must be rolled back. This situation, in
which a single transaction leads to a series of rollbacks, is called cascading rollback .