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
JoinProcessor caching issue #27504
Comments
Hi @yutv. 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. @yutv do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 14 days if no further activity occurs. Is this issue still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? Thank you for your contributions! |
I confirm the issue can be reproduced on vanilla Magento:
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 14 days if no further activity occurs. Is this issue still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? Thank you for your contributions! |
The issue still exists in vanilla Magento (commit d2155b3 by Thu Apr 15 16:17:07 2021 +0300, 2.4-develop branch). Do I really need to confirm it exists each three months? |
Hi @engcom-Bravo. Thank you for working on this issue.
|
Hi @engcom-Lima. Thank you for working on this issue.
|
Hi @yutv, |
What updates are you talking about? I have confirmed the issue exists multiple times since it was created. The issue is clearly described step by step, so even a child can reproduce. I have not seen any adequate comment from Magento Staff since then but only a desire to close the issue. If I create a new Issue the situation will be the same. So why do I need waste my time? |
I can confirm it is still reproducible. Please take action. |
I can confirm a similar issue still exists when using \Magento\Tax\Model\TaxRuleRepository::getList On the first call, the function works just fine, on the second call the joinProcessor does not add the JOIN to the SQL statement anymore. |
You can fix the problem by applying a patch to Api/SearchCriteria/CollectionProcessor/JoinProcessor.php to clear the cache at the end of the process function : The problem is caused by the appliedFields property not getting cleared properly at the end and being reused for other completely unrelated collections. |
Looks like we have a fix |
Hi @engcom-November. Thank you for working on this issue.
|
Hello @yutv, Thank you for the report and collaboration! Verified this issue on 2.4-develop. Please take a look at the screenshot below: Hence confirming the issue. Please find the custom module used to reproduce the issue. Thank you. |
✅ Jira issue https://jira.corp.adobe.com/browse/AC-11690 is successfully created for this GitHub issue. |
✅ Confirmed by @engcom-November. Thank you for verifying the issue. |
Preconditions (*)
Steps to reproduce (*)
Add a module with JoinProcessor for the OrderRepository using the files below:
app/code/SomeVendor/SomeModule/registration.php
app/code/SomeVendor/SomeModule/etc/module.xml
app/code/SomeVendor/SomeModule/etc/di.xml
app/code/SomeVendor/SomeModule/Model/Api/SearchCriteria/JoinProcessor/Store.php
app/code/SomeVendor/SomeModule/Console/Command/OrderUpdate.php
Run the following CLI commands:
Expected result (*)
Actual result (*)
More Details
In the second
foreach
iteration the JoinProcessor it not applied because it is marked as already applied in the$this->appliedFields
property of theMagento\Framework\Api\SearchCriteria\CollectionProcessor\JoinProcessor
class. It looks right, but in the second iteration we have a fresh new instance of the order collection where is no JOIN which was added in the first iteration. You may check it with thePlease provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.
The text was updated successfully, but these errors were encountered: