Search RU
Trainer / case
CASE · middle concurrency

Double debit from the balance

Two requests to debit 100 rubles from a balance of 150 run at the same time,
and both succeed. The balance goes negative. How would you reproduce the race
and what would you check?