← Quiz: Design a Ticket Booking System: all 10 questions
Quiz: Design a Ticket Booking System · Question 1 of 10
What causes double booking in "check, then act" code?
What causes double booking in "check, then act" code?
- A.Too many seats in the database
- B.Two requests both read "free" before either writes "booked" — a race condition
- C.Using SQL instead of NoSQL
- D.A slow payment gateway
Answer & explanation
Correct answer: Two requests both read "free" before either writes "booked" — a race condition
The check and the change are separate steps, so another request can slip between them.
Can you get the rest right without peeking?
Take the timed Quiz: Design a Ticket Booking System quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →