Skip to content

Duplicate orders with same Quote Id at same time with few time difference. #13952

Closed
@amitvishvakarma

Description

@amitvishvakarma

Preconditions

  1. Ability to process requests at same time. (in our case, we had use 2 different Client's system.)

Steps to reproduce

  1. Login as a User
  2. Add items to cart and proceed through checkout.
  3. Select Any payment method. Not click on place order button
  4. Now login to the same account in another system.
  5. And proceed to checkout with the same items. Not click on place order button.
  6. Now you have to click on place order at the same time with both the systems.
    Observe order confirmation screen of both systems. (usually first time you will get an error about constraint violations. Try to repeat steps 1-6 again. Issue reproduces 100% from the second attempt)

Depending on your infrastructure, this bug may be challenging to reproduce. It requires all of the "Place order" button clicks to be processed concurrently by Magento. You will not see the bug if Magento is processing requests sequentially (as the second request will reference a cart ID that no longer exists).

Expected result
A single order has been placed.
Alternatively, if multiple requests are unavoidable: Only the first request to be processed.

Actual result
Two different orders have been placed with very few seconds as time difference with same quote Id.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: Cart & CheckoutIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P0This generally occurs in cases when the entire functionality is blocked.Progress: doneReported on 2.3.xIndicates original Magento version for the Issue report.Reported on 2.4.xIndicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branch

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions