-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Missing paid orders and lock wait timeouts in Guest Checkout #25862
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
Comments
Hi @IvanChepurnyi. Thank you for your report.
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:
For more details, please, review the Magento Contributor Assistant documentation. @IvanChepurnyi do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?
|
This same code also wreaks havoc on error handling, and the ability to handle errors from code when they do occur. Related issue: #18752 (comment) |
Hi @engcom-Charlie. Thank you for working on this issue.
|
✅ Confirmed by @engcom-Charlie Issue Available: @engcom-Charlie, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself. |
Interested if this will also fix my issues with ghost orders who have an order id in PSP |
Hi @sdzhepa. Thank you for working on this issue.
|
Hello @IvanChepurnyi @PascalBrouwers @rhoerr The internal Magento team is working on this issue right now. I will keep updating this Issue with commits as soon as changes will be pushed to the public |
Very interesting. I wonder if this could cause #15427 (comment) where I saw a deadlock in paypal express. |
@convenient This issue might have caused dozens of adverse effects since the introduction of transactions in guest order placement API. Your deadlock most probably a combination of both factors, this issue and |
Thank you @IvanChepurnyi I will look into the |
@sdzhepa Any updates? |
Hello @ccrothers Internal Jira ticket related to 2.4 |
FYI: @ccrothers @IvanChepurnyi @convenient @PascalBrouwers @rhoerr cc: @naydav @andrewbess One more update
May I ask to confirm:
|
That solution looks like not completely fixes a problem, as sales rule usage update still potentially causes deadlock under high load when a lot of concurrent orders are placed at the same time. The only way to fix this problem is by introducing the append-only event log of sales rule counter adjustment log and using cronjob to update sales rule table. |
@engcom-Charlie what is the timeline for this release ? |
@sodhancha The internal team resolved the issue - async processing for the coupon/rule usage was implemented. PR with the solution will be delivered in the 2.4-develop branch during the next 2 weeks. |
The changes already merged into 2.4-develop. Commit id: a18bfe0 |
Due to the comments above issue is fixed and delivered |
This also fixes #18752 - exception thrown during payment capture causes a poor error for the user and the exception log contains "Rolled back transaction has not been completed correctly" |
Can this be extracted to a plugin for the time being? I don't have very much experience with plugin development. |
..lost 3% of payments…and tons of hours… will this fix be implemented in Magento 2.4.2? i cant find it in the release notes. to be clear: I do have magento 2.4.1 Remark from Gene commerce, who are responsible for the bundlked braintree plugin: We have seen numbers of merchants who faced the same issue where the Orders do not appear in Magento but they appear in Braintree Transaction. We had spent numbers of hours on this issue last year and at the end, it was found that this issue was from Magento end. We contacted Magento and they informed that this issue was fixed and fix is available from Magento 2.4 onwards. |
@hubertus2017 05.02.2020. is release day for 2.4.2. Hope this get's fixed, we are having a lot of problems because of this. |
Hello @zcuric @hubertus2017 jFYI: #31967 (comment)
|
Oh boy, so not in 2.4.2? Man, this is disappointing. Can some please make a patch or extension that fixes this? |
@sdzhepa has this landed in 2.4.2? |
The patch solving a similar issue is available in Magento Quality Patches package (MQP) Patch Compatible versions Applying a patch - Magento OpenSource/Commerce
See MQP Magento Commerce documentation Applying a patch - Magento Commerce Cloud Patch Details |
@zcuric ^^^ |
This is not compatible with EE 2.4.0
Please provide a patch which is compatible with EE 2.4.0
…On Thu, Feb 11, 2021 at 4:12 AM Magento Quality Patches < ***@***.***> wrote:
@zcuric <https://github.com/zcuric> ^^^
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#25862 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAIA3O7RJ76UAYW4GHHYKQTS6MB3VANCNFSM4JTGWT7A>
.
--
Regards,
Sodhan Manandhar
|
|
@zcuric |
Opening this again. This issue has occured for customers who are not GUEST |
Confirming that this happens relatively often on EE 2.4.2 as well. The payment processor finish the transaction, but the quote for the given order doesn't exists (anymore?), thus the order creation cannot be finished, leading to the customer being charged but order never created thus cannot be fulfilled. Its annoying because there is no specific rule to debug, it can happen with registered users as well with guest accounts, but no clear reason why exactly it happens. Not to mention that it ruins the reputation of the website... |
We have managed to narrow it down to the point of basically a racing condition... You can relatively easily reproduce it.
Hope it helps someone... |
Still experiencing the same issue. Another order from a customer that is missing from magento but the customer was charged via Stripe. Magento 2.4.7-p2. Can this issue please be re-opened? |
Update on Jul 28 2020
The issue was not completely fixed in internal Jira tickets MC-29335 and MC-29206.
#25862 (comment)
#25862 (comment)
During peak sales hour, one of my customers lost 400+ Magento orders but had charged credit card transactions at the PSP.
At first, I thought PSP implementation was a reason for missing orders, but after the investigation, it turned out this a result of a pull request being merged 2 years ago in Guest Place Order API endpoint of Magento related to this issue #6363.
That change added
beginTransaction()
andcommit()
around the whole place order process involving payment API calls and multi-entity save process ignoring that it results in lock contention on database level for an update of the same row in the same table (sales_rule
). Although intentions were good (implementation to fix stock deduction issues), but it introduced huge performance bottleneck and rollbacks complete order history for paid and valid orders if wait-lock happens during the ordering process.Preconditions (*)
Steps to reproduce (*)
Expected result (*)
Actual result (*)
Workaround
If you are using MSI it is possible to completely remove transactions and make it work in the same way as for logged-in user checkouts. Here is a patch that can be applied for "magento/module-checkout":
The text was updated successfully, but these errors were encountered: