Stopping Black Friday Oversells: A Stock Reservation Data Model
The bug that only shows up during the sale Most checkout flows work fine on a normal Tuesday. You read the stock count, check that it is above zero, take payment, and decrement it. The flaw stays hidden until many buyers go after the same discounted item in the same few seconds.