X) 1 XXXXX XX the XXXXXX XXXXXX XXXXX The state of XXX XXXXXX right XXXXXX XXX XXXXX is XX follows: XXXXXXXXXXX XXXXX: transID lastLSN XXXXXX XX X Running (i.e. In Progress) Transaction XX gets removed from the table XXXXX XX force-write (i.e., XXXXX and XXX XX XXXX) the XXXXXX log record. Right XXXXXX being removed, T1 had an entry in the table with l XXXXXX committed. Dirty XXXX XXXXX: XXXXXX recLSN P1 X P2 X Log: XXX transID prevLSN type pageID log entry undoNextLSN X T1 - XXXXXX XX - X T2 - XXXXXX P2 - X T3 2 Update XX - X XX 1 XXXXXX XX - X XX 4 Commit - - X T2 3 Abort XX - X T1 X End - - - X) Redo XXXXX XXX XXXX XXXXX XXXXXX XX the rstLSN, which XX XXX smallest XXX in XXX Dirty Page Table. XX this example, it's LSN 1. For XXXX redoable XXX XXXXXX (update or CLR), the redo phase redoes XXX change if XXXXXXXXX. XX check XX XXX XXXXXX needs to reapply the change XX the XXXX, it rst XXXXXX XX the page is in XXX XXXXX Page XXXXX. If it is in XXX table, XXXX it XXXXXX that the recLSN for the page is XXXXX or equal to the LSN XX XXX change under XXXXXXXXXXXXX. XX that is the XXXX, then XXXXX the system reads XXX page XXXX XXXX and checks XX the pageLSN XX strictly XXXXXXX XXXX XXX XXXXXXX LSN. XX XXXX XX the case XXXX it XXXXXX XXX XXXXXX. Otherwise, it skips XXX change. XX XXX example, we get XXX following: XXX 1: XXXXXX. LSN X: XXXXXX LSN X: No need XX XXXX because Page LSN XX X XXXXXXX. LSN 4: XXXXXX LSN 5: XXXXXXX XX this XXXXX, the XXXXXX XX XXXX in the state XX XXX XXXX XXXX XXX tail XX XXX log was last XXXXX XX disk. The system can now XXXXX an END XXXX record XXX T1. XXXX XXXXXX will have XXX X. XX can XXXX be XXXXXXX XXXX XXX XXXXXXXXXXX XXXXX. 4) The system XXXX XXXX XX. It's the XXXX transaction in XXX Transaction XXXXX. XXX XXXXXXX XX X. So we start XXXX XX XXXX XXX X. There XX no XXXX XX write an XXXXX log record XXXXXX undo. The XXXXXX can write XXXX directly: X Second XXXXX Let's consider several XXXXXXXXX for a second crash: System XXXXXXX without having written any of XXX new log entries or pages XX XXXX: XX that case, XXX system XXXX XXXX the XXXXXXXX, XXXX, XXX XXXX phases in XXXXXXX XXX XXXX XXX as we did above. System ushes XXX XXX XX XXXX, XXXXXX for T2's XXX log XXXXXX: XX that XXXX, at the XXX of the XXXXXXXX XXXXX, only XX is in XXX Transaction XXXXX. XX XXXX XXX same Dirty XXXX XXXXX. The redo XXXXX XX the same XX XXXXX until LSN X. XXX LSN 6, XXX system does nothing. For LSN 7, XX XX XXXXXXXXXX XXXXX the XXXX XX disk, XXXX XX skip it. Otherwise, XX reapply the XXXXXX. XXXX XXX XXX X. XXXXXXX, XXX XXXX phase will XXXX XX. XX XXX a CLR XXX T2 XXXXXXX XXX XXXXXXXXXXX. So it XXXXXX an END XXX XXXXXX XXXXXXXX. System XXXXX XXX entire XXX log XX XXXX: In XXXX XXXX, the transactions table at the end of the analysis phase is empty XXX the XXXXXX XXXXX not XXXX XXXXXXXX. System crashes after XXXXXX CLR with LSN X. In XXXX case, the XXXX XXXXX starts from XXXX CLR XXXX XXXXXXX T2. It XXXXXXXX XXXXXXX XXX XXXX NextLSN XXXXXXX. It XXXX the XXXXXX CLR and END log records.