- Initially: T1 and
T2 are
active:
Undo/redo log:
<START T1>
<T1, A, 4, 5>
<START T2>
<COMMIT T1>
<T2, B, 9, 10>
|
- Now we want to
perform a checkpoint:
- Write
(Do not include
T1
because T1 has
committed !!!)
- Write
the
DB element A
and B to
disk !!!
(Even
when T1
has committed,
the data written by
T1
may not have been
written to disk !)
- Write
- Flush log
|
- Possible continuation:
Undo/redo log:
<START T1>
<T1, A, 4, 5>
<START T2>
<COMMIT T1> ==== T1 done
<T2, B, 9, 10>
============================
<START CKPT(T2)>
<T2, C, 14, 15> <--+ Between here:
<START T3> | **** OUTPUT(A) and OUTPUT(B)
<T3, D, 19, 20> <--+
<END CKPT> // Flush Log
<COMMIT T2> ===== T2 done
<COMMIT T3> ===== T3 done
(OUTPUT for T2 and T3 happens later)
|
Comment:
- The checkpointing procedure
will output
all updated DB elements
before
writing the
<END CKPT> record
- This will
simplify the
recovery of
the
completed transactions !
|
Example:
|
|