(In Case the video is not opening.)
So, once the crash happens the log is read backwards up to the checkpoint and the ... So, this
is read backwards this is very importantly, this is read backwards up to the checkpoint and the
following thing is done , if there is a (commit, Ti) is found in this backward scan then there is
a redo list, where Ti is added to the redo list. Now, on this scanning backward if suppose on
the other hand somebody founds the (start, Tj) then there is an undo list, where Tj is added.
And suppose there is some other Tk which started earlier ... Now, note that scanning of the log
goes only up to the checkpoint, however, what will happen is that since Tk started before the
checkpoint and has not committed, Tk must appear somewhere in this TL. So, this is, must be
in the active, in the list of active transactions, so this is the list of active transactions. So, Tk
must be appearing somewhere in that. So, Tk is not found using this scanning, but Tk is in the
active list, then Tk is also added to the undoing list.
Of course, if Tk has not been in the redo list; that means, Tk there is no commit Tk entry of
this, if there is (commit, Tk) entry, then Tk would have been added to the redo list then nothing needs to be done. But, otherwise Tk needs to be added to the undo list. So, this is the way how
the redo list and the undo list are being made and then we follow the same thing. So, undos
are first done in a reverse order and then the redos are being done in a forward order.
So, the transactions in the undo list are first revert it back in the reverse order as they appear
in the log and the transactions in the redo list are then done in the forward order as they
appear in the log. And one more thing only the operations after the checkpoint, so, this is read
only up to the checkpoint, so, only the operations after the checkpoint needs to be either
undone or redone, that is it, because before that everything has been either undone or redone
Source : https://nptel.ac.in/content/storage2/nptel_data3/html/mhrd/ict/text/106104135/lec32.pdf