hard20 pts · first answer countsconcurrencytransactions
Deadlocks between two transfers
A transfer from A to B locks row A then row B. At the same moment, a transfer from B to A locks B then A. The database reports deadlocks under load. What is the best fix?
Discussion 0
Join free to post in the discussion.
Related questions
- Atomicity in a money transferBackend Developer
- Duplicate emails despite a checkBackend Developer
- Isolation levels and dirty readsBackend Developer
- Optimistic lock update hits 0 rowsBackend Developer
- Lost update on a wallet balanceBackend Developer
- Saving to DB and publishing an eventBackend Developer
- One slow route freezes Node.jsBackend Developer
- Why a lock alone is not enoughBackend Developer