New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cart rules can be reused under concurrent access #6364

Closed
TWarszawski opened this Issue Aug 26, 2016 · 3 comments

Comments

@TWarszawski
Copy link

TWarszawski commented Aug 26, 2016

Description

When two customers check out concurrently using the same cart rule that has a ‘Uses per Coupon’ of 1, the cart rule can be used twice.

Preconditions

  1. Ubuntu 14.04
  2. Xampp 5.6.19
  3. Magento CE 2.1.0 with sample data.

Steps to reproduce

  1. Start site, create two customers, create/pick test product, create test cart rule with ‘Uses per Coupon’ of 1.
  2. Both customers add the item to their carts, apply the cart rule, and perform the 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 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:
https://gist.github.com/TWarszawski/a0d8dd8aea9eb5b774d64c9f826de6db

Expected result

  1. Only one checkout successfully completes using the cart rule.

Actual result

  1. Both checkouts successfully complete using the cart rule.
@oleg-onufer

This comment has been minimized.

Copy link
Contributor

oleg-onufer commented Jun 23, 2017

@TWarszawski Thanks for reporting this issue.
Internal ticket MAGETWO-70156 was created.

@magento-engcom-team

This comment has been minimized.

Copy link
Contributor

magento-engcom-team commented Oct 6, 2017

@TWarszawski, thank you for your report.
We've created internal ticket(s) MAGETWO-70156 to track progress on the issue.

@magento-engcom-team

This comment has been minimized.

Copy link
Contributor

magento-engcom-team commented May 8, 2018

@TWarszawski, thank you for your report.

Unfortunately, we are archiving this ticket now as it did not get much attention from both Magento Community and Core developers for an extended period. This is done in an effort to create a quality, community-driven backlog which will allow us to allocate the required attention more easily.

You may learn more about this initiative following this link.

Please feel free to comment or reopen the ticket if you think it should be reviewed once more. Thank you for collaboration.

@magento-engcom-team magento-engcom-team moved this from Triage Wanted to Archive in Triage Wanted May 8, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment