Ctrl K
Backend · Senior · Theory

What anomalies occur with concurrent transactions, and how do isolation levels protect against them? Give an example where Read Committed would let you down.

~4 min by voice

How to approach it

The interviewer wants to see whether you understand the real concurrency anomalies and not just the table from the standard: lost update and write skew, the dependence on the DBMS, and whether you can fix races precisely (locks, atomic UPDATEs, constraints) rather than just "setting Serializable".

Have you seen this question in a real interview?
Answers0
Avg. score—
Strong—
Practiced0
Topics
Similar questionsВозьмём перевод между двумя счетами, которые лежат в одной базе: списать с одного, зачислить на другой. Как вы это реализуете, чтобы при параллельных операциях деньги не потерялись и баланс не ушёл в минус? SeniorHow does the @Transactional annotation work in Spring? JuniorIn a Django service, two concurrent requests are charging money from the same balance, and sometimes the balance goes negative or one of the charges gets lost. Why does this happen, and how would you fix it? SeniorA method is annotated with @Transactional, but when an error occurs the data in the database isn't rolled back. What causes would you check? Mid-levelHow does the @Transactional annotation work in Spring? Tell me about situations where a transaction behaves differently from what the developer expects. Senior

Answer by voice

The interviewer will ask this question and listen. Think out loud and ask for a hint if you need one. When you're done, pause or tap “That's my answer”. In about a minute, your score and the points you covered show up here.

Sign in to answer

Best with headphones · ~4 min