If a cohort in a distributed transaction has performed only read operations, the two-phase commit protocol can be simplified. When the cohort receives the prepare message, it gives up its locks and terminates its participation in the protocol. Explain why this simplification of the protocol works correctly.
What will be an ideal response?
The cohort terminates it participation in the protocol before it is determined whether the distributed transaction, T, commits or aborts. Ordinarily, if T aborts, the cohort must rollback the subtransaction, but with a read-only transaction, there are no
changes to roll back. It makes no difference whether the cohort releases locks when the prepare message is received or when the protocol terminates (as would be the case without the simplification) because any other transaction that writes an item that the cohort had read would have to follow T in the global ordering in either case.
You might also like to view...
A(n) _________ tag is a keyword that describes information, such as the content of a media element.
Fill in the blank(s) with the appropriate word(s).
An application server may reside on the same computer as a Web server or on its own dedicated computer.
a. true b. false