A commit log is used to track the necessary state to make decisions during an n-phase commit process, or else to unroll back to any pre-committed state.
-
It either contains inverse operations or records the state of the object
prior to the start of the transaction. These can be used to revert in the case
of abort or failure during the transaction.
-
It also contains an effective duplicate of the operations and parameters of
the transaction, since it must be feasible to replay the transaction if there
is a system failure immediately after commitment.
This log must be in stable storage to maximize reliability.
In case two above, failure of a distributed transaction service includes
network failure. Network failure can be seen as temporary or long term
inability for the application and transaction service to contact each other
(loss of messages or network partitioning).