All or Nothing
db.transaction, rollback on error, half-done transfers, stale saves, optimistic locks and query runners.
0 / 8 levels · 0 / 24 ★Start playing ›
All or Nothing
A transaction is a shopping basket. You put things in, but nothing is paid for until checkout (COMMIT). Drop the basket, because of an error, and everything goes back on the shelf (ROLLBACK). A write made without a basket is paid for at the till the moment it runs.
Your rulebook
Finish a level to add its rule. Fill the book and you can explain all of this in an interview.
- 1Finish Checkout pays for everything to unlock this rule.
- 2Finish Drop the basket to unlock this rule.
- 3Finish Every save() checks out on its own to unlock this rule.
- 4Finish A transfer without a basket to unlock this rule.
- 5Finish The same transfer in a basket to unlock this rule.
- 6Finish A stale copy wins quietly to unlock this rule.
- 7Finish Ask for the version check to unlock this rule.
- 8Finish Holding the basket yourself to unlock this rule.