Closed
Description
Description:
When two customers check out concurrently for the same product and the total quantity being ordered is greater than the quantity available, the stock can become negative.
Preconditions
- Ubuntu 14.04
- Xampp 5.6.19
- Magento CE 2.1.0 with sample data.
Steps to reproduce
- Start site, create two customers, create/pick test product and allocate some stock.
- Both customers add the product to their carts such that each cart individually is under (and not equal to) the available stock, but combined they exceed the available stock.
- Perform a checkout concurrently, making sure both customers finish checkout (click the 'Place Order’ button) as close to the same time as possible.
We have reproduced this behavior on a single machine, by performing the above steps by simulating one customer in one browser window and another customer in a second browser window.
Expected result
- One of the two checkouts fails to complete.
Actual result
- Both checkouts succeed and the quantity for the product is negative in the admin console.
Metadata
Metadata
Assignees
Labels
Gate 2 Passed. Manual verification of the issue description passedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 1 Passed. Automatic verification of issue format passedGate 4. Acknowledged. Issue is added to backlog and ready for developmentThe issue has been reproduced on latest 2.1 releaseThe issue has been reproduced on latest 2.2 releaseThe issue has been reproduced on latest 2.3 release