Pick the fix
A transfer debits one account, then the process crashes before the credit. Which property should have prevented the half-done transfer, and how?
Hint 1 of 1
The problem is a crash halfway through, not a race.
Choose an answer, then open Show answer below to check it.
Show answer
Answer: A Atomicity: wrap both updates in one transaction so a crash rolls both back
Correct. Uncommitted work is discarded on recovery.
Atomicity means a transaction's changes happen together or not at all. If both updates are in one transaction and it never commits, recovery leaves neither visible.
Why not the others?
- B Isolation: use SERIALIZABLE. Isolation is about concurrent transactions, not crashes.
- C Durability: turn on fsync. Durability protects committed work; this work never committed.
- D Consistency: add a CHECK constraint on balance. A CHECK can't see that a matching credit is missing.