Skip to content

Atomic commit

wikipedia Atomic commit

In the field of computer science, an atomic commit is an operation that applies a set of distinct changes as a single operation. If the changes are applied then the atomic commit is said to have succeeded. If there is a failure before the atomic commit can be completed then all of the changes completed in the atomic commit are reversed.

This ensures that the system is always left in a consistent state. The other key property of isolation comes from their nature as atomic operations. Isolation ensures that only one atomic commit is processed at a time.

The most common uses of atomic commits are in database systems and version control systems.

The problem with atomic commits is that they require coordination between multiple systems.[1] As computer networks are unreliable services this means no algorithm can coordinate with all systems as proven in the Two Generals Problem. As databases become more and more distributed this coordination will increase the difficulty of making truly atomic commits.[2]

Database systems

Atomic commits in database systems fulfil two of the key properties of ACID,[4] atomicity and consistency. Consistency is only achieved if each change in the atomic commit is consistent.