magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.49k stars 9.31k forks source link

Product is oversold when multiple people purchase same product at the same time #28508

Closed secomm-dev closed 4 years ago

secomm-dev commented 4 years ago

Preconditions (*)

  1. Magento 2.3.x
  2. A product with QTY = 1, Saleable-QTY = 1
  3. Any payment method, any shipping method
  4. Any environment (standard LAMP following Magento recommendation)

Steps to reproduce (*)

  1. Multiple people add the product into cart. E.g. 10 people working on 10 different devices
  2. Proceed to Checkout
  3. Enter all required information: shipping address, shipping method, payment method
  4. At the very same time (millisecond), all people hit Submit button

Expected result (*)

  1. Only 1 Order should be created
  2. QTY remains 1
  3. Saleable-QTY becomes 0

Actual result (*)

  1. Multiple orders are created (it's a random number, but definitely more than 1)
  2. QTY remains 1
  3. Saleable-QTY becomes a negative number which equal to the number of orders that should have not been created (but have been)

Additional Information


Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.

m2-assistant[bot] commented 4 years ago

Hi @secomm-dev. Thank you for your report. To help us process this issue please make sure that you provided the following information:

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, please, review the Magento Contributor Assistant documentation.

Please, add a comment to assign the issue: @magento I am working on this


m2-assistant[bot] commented 4 years ago

Hi @sambath1293. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

sambath1293 commented 4 years ago

Hi @secomm-dev The issue specific for MSI should be reported in the MSI repo

fyi: @sidolov @smoskaluk @sdzhepa

It seems this issue MSI specific and should be fixed in MSI repository.

EngCom team, please confirm and transfer this issue to the https://github.com/magento/inventory/issues

Closing this issue

secomm-dev commented 4 years ago

Hi @sambath1293 thank you.

I have moved the issue to Inventory repository.