The compensation logs' redo-information corresponds to the undo-information of the log entry that made their creation necessary during the undo-phase.
That sounds to me like the CLRs redo information is the same as the undo information of the logs that sparked them.
But should't it be that they have the REDO information in order to cancel out the executed UNDO operations in case of an interrupted recovery process?
Here's an example:
let T2 be a loser transaction:
<#55, T2, P3, J=J+9, J = J-9, #53>
J=J+9 is the redo-op and J = J-9 is the undo-op.
Now the CLR that's appended to the Log file during the redo-phase would be:
<#56, T2, J=J-9,__, #53>
With J=J-9 being the undo-op of the original log entry as the redo information in the CLR. In case the recovery is interrupted, the log-entry #56 will be executed during redo phase.
The point of CLR is to ensure that restarting the recovery process and running it again always leads to the same result. How does running the J=J-9 operation during the redo phase of the rerun ensure this?
Can somebody please explain this to me?