Status: To Do
Affects Version/s: 188.8.131.52
Fix Version/s: None
When two customers check out concurrently for the same product, only one of the checkouts is reflected in the quantity field in the stock available table.
Steps to reproduce:
1. Start site, create two customers, create/pick test product.
2. Both customers add the product to their carts and perform a checkout concurrently, making sure both customers finish checkout (click the 'I confirm my order' button) as close to the same time as possible.
We have reproduced this behavior on a single machine, by performing the above steps with one customer in one browser window and another customer in a second browser window with a short communication delay (100 ms) between the database and application. If connecting to the database using unix sockets, the following script can act as a proxy that delays packets:
The final quantity is original - 2.
The final quantity is original - 1.