Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Two-phase commit protocol
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Commit (or completion) phase=== ====Success==== If the coordinator received an agreement message from all participants during the commit-request phase: #The coordinator sends a commit message to all the participants. #Each participant completes the operation, and releases all the locks and resources held during the transaction. #Each participant sends an acknowledgement to the coordinator. #The coordinator completes the transaction when all acknowledgements have been received. ====Failure==== If any participant votes No during the commit-request phase (or the coordinator's timeout expires): #The coordinator sends a rollback message to all the participants. #Each participant undoes the transaction using the undo log, and releases the resources and locks held during the transaction. #Each participant sends an acknowledgement to the coordinator. #The coordinator undoes the transaction when all acknowledgements have been received. ====Message flow==== <pre> Coordinator Participant QUERY TO COMMIT --------------------------------> VOTE YES/NO prepare*/abort* <------------------------------- commit*/abort* COMMIT/ROLLBACK --------------------------------> ACKNOWLEDGEMENT commit*/abort* <-------------------------------- end </pre> An * next to the record type means that the record is forced to stable storage.<ref name="mohan1986">[[C. Mohan]], Bruce Lindsay and R. Obermarck (1986): [http://dl.acm.org/citation.cfm?id=7266 "Transaction management in the R* distributed database management system"],''ACM Transactions on Database Systems (TODS)'', Volume 11 Issue 4, Dec. 1986, Pages 378 - 396</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)