Atomicity: Why Must a Group of Operations Succeed or Fail Together?

Atomicity: Why Must a Group of Operations Succeed or Fail Together?

Atomicity does not mean that an operation is literally tiny. It means treating several steps as one indivisible unit of commitment: in the result recognised by the system, either every step succeeds or a failure leaves no partial result behind.

A bank transfer makes the point clear. Moving $100 from account A to account B requires at least a debit and a credit. If the system stops after the debit, A has lost money while B has gained nothing. Each individual step may be valid, but the combined result is wrong. An atomic process keeps intermediate changes uncommitted until every required step can succeed; if any step fails, the unfinished group is rolled back.

Atomicity does not require instant execution. Many internal steps may occur, but outsiders should not see a half-finished state as the completed result. Nor is it idempotence, which asks whether repeating a request keeps changing the state. Atomicity asks whether one compound operation can be left half done. Compared with reversibility, it places a stricter boundary around commitment. Complex systems cannot prevent every failure, but they can specify which changes must stand or fall together.


Discover more from Geoffrey Chen

Subscribe to get the latest posts sent to your email.