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Возьмём перевод между двумя счетами, которые лежат в одной базе: списать с одного, зачислить на другой. Как вы это реализуете, чтобы при параллельных операциях деньги не потерялись и баланс не ушёл в минус? SeniorWhat is a database transaction, and what does the acronym ACID stand for? JuniorA 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-levelDuring a sale, an online store sold more units of a product than it had in stock. The code first checks the stock level and then decrements it. Why did this happen, and how would you fix it? Mid-levelHow does the @Transactional annotation work in Spring? Junior

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