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 for, necessity, atomic and/or commits:
“Mr. Speaker, at a time when the nation is again confronted with necessity for calling its young men into service in the interests of National Security, I cannot see the wisdom of denying our young women the opportunity to serve their country.”
—Lyndon Baines Johnson (19081973)
“The sadness of the womens movement is that they dont allow the necessity of love. See, I dont personally trust any revolution where love is not allowed.”
—Maya Angelou (b. 1928)
“The totality of our so-called knowledge or beliefs, from the most casual matters of geography and history to the profoundest laws of atomic physics or even of pure mathematics and logic, is a man-made fabric which impinges on experience only along the edges. Or, to change the figure, total science is like a field of force whose boundary conditions are experience.”
—Willard Van Orman Quine (b. 1908)
“Whoever commits to paper what he suffers becomes a melancholy author: but he becomes a serious author when he tells us what he suffered and why he now reposes in joy.”
—Friedrich Nietzsche (18441900)