Multiple ChoiceIntermediate 45s
Preventing seat oversell
Two clients read seat status FREE then both UPDATE to BOOKED. What is the standard fix to prevent oversell?
Options
- 1Conditional UPDATE ... WHERE status='FREE' and check affected rows, or SELECT FOR UPDATE row lock
- 2Add a read replica for the second client, so each reads the seat status from a separate replica and avoids double-booking
- 3Increase the connection pool size so both clients hold connections and each sees a consistent seat status before writing
- 4Cache the seat status in Redis without locks, so both clients read FREE and each proceeds to reserve the same seat
Think you can answer under pressure?
Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.