Closed pczerkas closed 2 weeks ago
Hi @pczerkas. Thank you for your report. To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:
@magento give me 2.4-develop instance
- upcoming 2.4.x release@magento I am working on this
Join Magento Community Engineering Slack and ask your questions in #github channel. :warning: According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting. :clock10: You can find the schedule on the Magento Community Calendar page. :telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.
Hi @engcom-November. 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:
Area: XXXXX
label to the ticket, indicating the functional areas it may be related to.2.4-develop
branch@magento give me 2.4-develop instance
to deploy test instance on Magento infrastructure. 2.4-develop
branch, please, add the label Reproduced on 2.4.x
.Issue: Confirmed
once verification is complete. Hello @pczerkas,
Thank you for the report and collaboration!
Can you let us know in which module or while calling which consumer this issue has occured.
Can you let us know in which module or while calling which consumer this issue has occured.
Hi @engcom-November , this issue is about general design here.
We've seen that problem happening in consumer async.operations.all
- sometimes first operation in bulk is not marked as done in DB.
@engcom-November , please look at https://github.com/magento/magento2/pull/39057 where is proposed fix. Looks like tests are passing OK.
Hi @engcom-Hotel. 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:
Area: XXXXX
label to the ticket, indicating the functional areas it may be related to.2.4-develop
branch@magento give me 2.4-develop instance
to deploy test instance on Magento infrastructure. 2.4-develop
branch, please, add the label Reproduced on 2.4.x
.Issue: Confirmed
once verification is complete. Hello @pczerkas,
Thank you for the report and your collaboration!
Your description seems valid to us. However, could you please provide details of the real-world scenario in which the flow is failing? We will try to replicate the scenario on our end to see if the issue is reproducible.
Thanks
Hello @pczerkas,
This issue is being closed since it has not been updated in a long time. Please feel free to reopen or raise a new ticket if the issue still exists.
Thanks
Preconditions and environment
Steps to reproduce
If queue message is published inside of open DB transaction, and message consumer processes it faster then DB transaction is commited, then message consumer (which is separate process from publisher) has not consistent view on data in DB, which leads to bugs.
Expected result
Queue messages can only be published, if calling code is NOT inside of active DB transaction.
Actual result
Queue messages ARE published, when calling code IS inside of active DB transaction.
Example: https://github.com/magento/magento2/blob/6f4805f82bb7511f72935daa493d48ebda3d9039/app/code/Magento/AsynchronousOperations/Model/BulkManagement.php#L131
Additional information
Problem can be resolved (in ideal scenario) by adding before plugin on interface Magento\Framework\MessageQueue\PublisherInterface::publish(), which checks if getTransactionLevel() on any active DB connection is not greater than 0.
This would probably be backward-incompatible change.
Release note
No response
Triage and priority