Information Technology Reference
In-Depth Information
Fig. 8.12 Transaction T 1 has performed the action WŒx; u ; v . Transaction T 2 has split the full
page p 4 and performed the action IŒy; v 0
latching page p 4 , it is found out that the tuple .x; v / is no longer there. Thus, we have
to resort to logical undo. For logical undo, the key x is searched for by a traversal
that starts from the root of the tree. However, this is not possible either, because the
tree does not contain the router to page p 0 4 that covers x. In conclusion, the undo
pass fails.
t
The problem of the previous example can be solved using a two-pass undo
pass :
1. By a backward scan of the log, roll back all uncommitted structure modifications.
2. By another backward scan of the log, roll back all active user transactions.
Example 8.18 Continuing with the previous example, the first pass of the undo
pass of recovery rolls back the uncommitted structure modification S , writing the
following log records:
n 16 Wh S; abort-smo i .
n 17 Wh S; undo-page-split ;p 2 ;x 0 2 ;p 0 2 ;s 2 ;V 2 ;n 7 i .
n 18 Wh S; undo-insert-index-record ;q 0 3 ;x 0 4 ;n 6 i ,
n 19 Wh S; undo-page-split ;q 3 ;x 0 3 ;q 0 3 ;s 3 ;V 3 ;n 5 i ,
n 20 Wh S; undo-page-split ;q 4 ;x 0 4 ;q 0 4 ;s 4 ;V 4 ;n 4 i ,
n 21 Wh S; commit-smo i .
The second pass of the undo pass aborts and rolls back the active transactions T 1
and T 3 , writing the log records:
n 22 Wh T 1 ;A i ,
n 23 Wh T 3 ;A i ,
n 24 Wh T 1 ;W 1 ;p 0 4 ;x; u ;n 1 i ,
Search WWH ::




Custom Search