|
|
This article does not cite any references or sources. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed. (February 2007) |
An atomic commit is an operation in which a set of distinct changes is applied as a single operation. If all the changes are applied, the atomic commit is said to have succeeded. If there is a failure before the atomic commit can be completed, (e.g., a network cable is disconnected or a conflict arises that cannot be automatically resolved) the "commit" is aborted and all changes that have taken place are reversed (rolled back). In either case, the atomic commit leaves the system in a consistent state. The word atom is used in its classical sense: an indivisible unit.
It has been proven that no algorithm can solve the problem via the proof of the Two Generals' Problem. However, algorithms such as the Two-phase commit protocol and Three-phase commit protocol can help with some of the atomic commitment problems.
Nowadays, atomic commits are most often encountered in database systems when committing multiple sets of changes at once. These changes can be different update statements to the same table or changes that span multiple databases.
Atomic commits are employed by modern revision control systems, allowing committing—uploading to the source—changes in multiple files (called a changeset) while guaranteeing that all files get fully uploaded and merged. In an atomic commit, typically the files that are committed together are concerned with a single modification, and everything changed in that modification should be included in the commit. In this way, the code base remains stable: users who update their working copy do not miss changes left to be committed in somebody else's working copy, the changeset is not too messy to read through, and if the atomic commit is rolled back, the single modification is removed from the code base.
See also
| This database-related article is a stub. You can help Wikipedia by expanding it. |
| This computer software article is a stub. You can help Wikipedia by expanding it. |
This entry is from Wikipedia, the leading user-contributed encyclopedia. It may not have been reviewed by professional editors (see full disclaimer)




