Question library
Questions from real interviews. Drill any of them by voice in a couple of minutes, with an interviewer, a score and feedback.
How does the @Transactional annotation work in Spring?JuniorWhat 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? Tell me about situations where a transaction behaves differently from what the developer expects.SeniorIn 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?SeniorWhat anomalies occur with concurrent transactions, and how do isolation levels protect against them? Give an example where Read Committed would let you down.SeniorВозьмём перевод между двумя счетами, которые лежат в одной базе: списать с одного, зачислить на другой. Как вы это реализуете, чтобы при параллельных операциях деньги не потерялись и баланс не ушёл в минус?Senior