Download presentation
Presentation is loading. Please wait.
1
Examples Undo, Redo, Undo/Redo
2
Undo Log <START S> <S,A,60> <COMMIT S>
<START T> <T,A,10> <START CKPT (T)> <START U> <U,B,20> <T,C,30> <START V> <U,D,40> <V,F,70> <COMMIT U> <T,E,50> <COMMIT T> <V,B,80> <COMMIT V> Suppose that we begin a non quiescent checkpoint immediately after <T,A,10> Tell, When the <END CKPT> is written? For each possible point at which a crash could occur, how far back in the log we must look to find all the possible incomplete transactions?
3
Undo Log <START S> <S,A,60> <COMMIT S>
<START T> <T,A,10> <START CKPT (T)> <START U> <U,B,20> <T,C,30> <START V> <U,D,40> <V,F,70> <COMMIT U> <T,E,50> <COMMIT T> <END CKPT> <V,B,80> <COMMIT V> Suppose that we begin a non quiescent checkpoint immediately after <T,A,10> Tell, When the <END CKPT> is written? For each possible point at which a crash could occur, how far back in the log we must look to find all the possible incomplete transactions? If the crash occurs after <END CKPT>, we have to search back only to the <START CKPT(T)>. However, for crashes prior to the <COMMIT T> record, the search must continue back as far as the <START T> record, since that is the (lone) transaction that was active at the start of the checkpoint.
4
Redo Log <START S> <S,A,60> <COMMIT S>
<START T> <T,A,10> <START CKPT (T)> <START U> <U,B,20> <T,C,30> <START V> <U,D,40> <V,F,70> <COMMIT U> <T,E,50> <COMMIT T> <V,B,80> <COMMIT V> Suppose that we begin a non quiescent checkpoint immediately after <T,A,10> Tell, When the <END CKPT> is written? For each possible point at which a crash could occur, how far back in the log we must look to find all the possible incomplete transactions?
5
Redo Log <START S> <S,A,60> <COMMIT S>
<START T> <T,A,10> <START CKPT (T)> <START U> <U,B,20> <T,C,30> <START V> <U,D,40> <V,F,70> <COMMIT U> <T,E,50> <COMMIT T> <V,B,80> <COMMIT V> Suppose that we begin a non quiescent checkpoint immediately after <T,A,10> Tell, When the <END CKPT> could be written? For each possible point at which a crash could occur, how far back in the log we must look to find all the possible incomplete transactions? Consider both the case that the <END CKPT> record was or was not written prior to the crash. <END CKPT> can occur at any point after the <START CKPT(T)>. If the crash occurs after <END CKPT>, we restrict ourselves only to committed transactions that were listed in <START CKPT(..)>, i.e. T, and those that started after this point. If the crash occurs in between, then, for this example, we have to consider all the log.
6
Undo/Redo Log <START S> <S,A,60,61> <COMMIT S>
<START T> <T,A,61,62> <START CKPT (T)> <START U> <U,B,20,21> <T,C,30,31> <START V> <U,D,40,41> <V,F,70,71> <COMMIT U> <T,E,50,51> <COMMIT T> <V,B,21,22> <COMMIT V> Suppose that we begin a non quiescent checkpoint immediately after <T,A,61,62> Tell, When the <END CKPT> could be written? For each possible point at which a crash could occur, how far back in the log we must look at?
7
Undo/Redo Log <START S> <S,A,60,61> <COMMIT S>
<START T> <T,A,61,62> <START CKPT (T)> <START U> <U,B,20,21> <T,C,30,31> <START V> <U,D,40,41> <V,F,70,71> <COMMIT U> <T,E,50,51> <COMMIT T> <V,B,21,22> <COMMIT V> Suppose that we begin a non quiescent checkpoint immediately after <T,A,61,62> Tell, When the <END CKPT> could be written? For each possible point at which a crash could occur, how far back in the log we must look at? <END CKPT> can occur at any point after the <START CKPT(T)>. If the crash occurs after <END CKPT>, we restrict ourselves only to transactions that were listed in <START CKPT(..)>, i.e. T, and those that started after this point. If the crash occurs in between, then, for this example, we have to consider all the log.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.