1 / 7

Transaction Log Analysis for Incomplete Transactions Recovery

Learn how to identify incomplete transactions in a transaction log and determine the point at which a crash occurred. Discover the necessary steps for recovery using undo, redo, or undo/redo logging techniques.

fspencer
Download Presentation

Transaction Log Analysis for Incomplete Transactions Recovery

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  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.

More Related