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
- What atomicity guaranteesBackend Developer
- Updating a counter in MongoDBBackend Developer
- Counting API calls in RedisBackend Developer
- Isolation levels and dirty readsBackend Developer
- Optimistic lock update hits 0 rowsBackend Developer
- What a dirty read isBackend Developer