Atomic Commit - Necessity For Atomic Commits

Necessity For Atomic Commits

Atomic commits are essential for multi-step updates to data. This can be clearly shown in a simple example of a money transfer between two checking accounts.

This example is complicated by a transaction to check the balance of account Y during a transaction for transferring 100 dollars from account X to Y. To start, first 100 dollars is removed from account X. Second, 100 dollars is added to account Y. If the entire operation is not completed as one atomic commit, then several problems could occur. If the system fails in the middle of the operation, after removing the money from X and before adding into Y, then 100 dollars has just disappeared. Another issue is if the balance of Y is checked before the 100 dollars is added. The wrong balance for Y will be reported.

With atomic commits neither of these cases can happen, in the first case of the system failure, the atomic commit would be rolled back and the money returned to X. In the second case, the request of the balance of Y cannot occur until the atomic commit is fully completed.

Read more about this topic:  Atomic Commit

Famous quotes containing the words necessity, atomic and/or commits:

    Whoever is not in the possession of leisure can hardly be said to possess independence. They talk of the dignity of work. Bosh. True work is the necessity of poor humanity’s earthly condition. The dignity is in leisure. Besides, 99 hundredths of all the work done in the world is either foolish and unnecessary, or harmful and wicked.
    Herman Melville (1819–1891)

    The pace of science forces the pace of technique. Theoretical physics forces atomic energy on us; the successful production of the fission bomb forces upon us the manufacture of the hydrogen bomb. We do not choose our problems, we do not choose our products; we are pushed, we are forced—by what? By a system which has no purpose and goal transcending it, and which makes man its appendix.
    Erich Fromm (1900–1980)

    “I am responsible for everything” commits one to nothing.
    Mason Cooley (b. 1927)