Encyclopedia  |   World Factbook  |   World Flags  |   Reference Tables  |   List of Lists     
   Academic Disciplines  |   Historical Timeline  |   Themed Timelines  |   Biographies  |   How-Tos     
Sponsor by The Tattoo Collection
Two-phase commit
Main Page | See live article | Alphabetical index

Two-phase commit

In computer science, especially in durability studies, a two phase commit allows data to be written to more than one location and for all operations to be rolled back, if one or more of the operations fails.

In essence:

Each participants resource manager coordinates local operations
If successful
respond "OK"
If unsuccessful
either allow a time-out or respond "NOT OK"

If all participants respond "OK":
Coordinator instructs participating resource managers to "COMMIT"
Participants complete operation
Otherwise:
Coordinator instructs participating resource managers to "ROLLBACK"
Participants complete their respective local undos