|
1. Write a start checkpoint log record:
<START CKPT(T1, T2, ..., Tk)> to log file
where T1, T2, ..., Tk are the currently active transactions
2. Flush-Log (optional)
3. Wait until all of T1, T2, ..., Tk to commit or abort.
(DBMS can accept new transactions !!!)
4. When all T1, T2, ..., Tk have completed:
Write
<END CKPT> to log file
5. Flush-Log (essential to keep the log file short)
|
|
|
|
/* ==================================================
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 committed transactions
identify the uncommitted/aborted transactions
|
|
|
/* ==================================================
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 committed
identify the uncommitted/aborted transactions
|
|
|
is:
|
Graphically:
|
|