Slideshow:
|
|
/* ================================================== Step 1: scan the appropriate log portion and identify the uncommited transactions ================================================== */ Scan the undo log backwards until first <START CKPT(T1, T2, ..., Tk) record: { identify the uncommitted transactions } /* ================================================== Step 2: undo the uncommited transactions ================================================== */ Scan the undo log backwards until first <START CKPT(T1, T2, ..., Tk)> record: { For ( each < T, A, v > in undo log ) do { if ( T is uncommited ) { Update A with the (before) value v; // Undo the action !!! } } /* ========================================================= Step 3: mark the uncommited tranasactions as failed.... ========================================================= */ For ( each T that is uncommited ) do { Write <ABORT T> to log; } Flush-Log |
|
|
/* ================================================== Step 1: scan the appropriate log portion and identify the uncommited transactions ================================================== */ Scan the undo log backwards until we found all <START T1>, <START T2>, ..., <START Tk> records: { identify the uncommitted transactions } /* ================================================== Step 2: undo the uncommited transactions ================================================== */ Scan the undo log backwards until we found the earliest uncommitted <START Tk> records: { For ( each < T, A, v > in undo log ) do { if ( T is uncommited ) { Update A with the (before) value v; // Undo the action !!! } } } /* ========================================================= Step 3: mark the uncommited tranasactions as failed.... ========================================================= */ For ( each T that is uncommited ) do { Write <ABORT T> to log; } Flush-Log |
|
|
is:
|
Graphically:
|