Avoiding a half-completed transfer
A transfer must not retain a debit while losing its matching credit. Atomicity requires its protected modifications to take effect as a unit, or to be canceled when the transaction fails.
Indivisibility here describes transactional effects, not one processor instruction. A database can combine logging, coordination, and recovery to make many reads and writes atomic. This differs from a single atomic read-modify-write on a shared variable.
Recovery restores a complete state
SQLite’s rollback-journal design preserves original page contents before overwriting the database. If interruption occurs before completion, recovery can restore the earlier state instead of accepting a partially written file.
Other logging schemes have different commit and recovery rules. The relevant test is the state recoverable under the stated failures, not whether an update happened through one function call or one file write.
Protected effects have boundaries
Atomicity alone does not supply the required concurrency isolation or durability after commit. Those guarantees need their own mechanisms and correct transaction boundaries.
Interfaces can also define exceptions. PostgreSQL sequence changes are not rolled back on transaction abort, so unused identifiers can remain. Atomic transactions do not imply restoration of every counter, external effect, or diagnostic record.