Two jobs race on one balance
Job A deposits 50 and job B withdraws 30 from the same account, which holds 100. Each job reads the balance, works for about four seconds, then writes the result. The final balance should be 120. Step through both runs with Previous and Next, or the arrow keys: the playhead marks the same moment in each. The times are illustrative.
Before the fix, B reads the balance before A has written, so B's write is computed from a read that is four seconds stale and replaces A's deposit.
After the fix, each job takes a row lock before it reads. B waits until A has written and unlocked, so B reads 150 and both changes survive, three seconds later than the broken run finished.