1
Vote

To enlist with EnlistDurable and implement recovery procedure

description

Fulfill the following to realize the issue:
  1. Using EnlistDurable() methods to take part in a transaction;
  2. Using a write-to-disk transaction log to build undo & redo logs, flushes to disk for every individual action of the transction taken;
  3. Look up the logs of the last transaction if any, for committed transactions, proceed the unfinished actions; and for the uncommitted transactions, rollback the finished actions;
  4. The intial status of the log is UNCOMMITTED;
  5. Once the commit command is executed, mark the log as COMMITTED;
  6. Once the rollback command is executed, mark the log as ROLLBACKED; (not necessary, the procedure of this situation should be the same as the 5th item)
  7. Once an individual action completes, clears the log of the action;
  8. Once all the actions of the transaction completed, clears the log of the transaction.

comments