Read-Only Commit Optimization

MS DTC permits resource managers that have read but not updated transaction-protected data to reply "read-only" at phase one. In this case, the transaction manager will not deliver the second phase notification to the resource manager. This optimization reduces the expense of committing the transaction, but it also reduces the degree of isolation from degree three to degree one. If a resource manager chooses to provide degree three isolation, it must hold its locks until phase two of commit. A resource manager that releases its locks and replies “read only” at phase one is reduced to providing degree one isolation.

The read-only optimization is also used between transaction managers to optimize the commitment of whole sub-trees of the transaction tree. A transaction manager replies “read-only” if all of the resource managers and transaction managers subordinate to it reply “read-only.” This signifies that this transaction manager and the entire sub-tree it controls need not receive notification at phase two of commit.