-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Set all instances of cache context to be transient #29699
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
Conversation
Hi @mlambley. Thank you for your contribution
❗ Automated tests can be triggered manually with an appropriate comment:
You can find more information about the builds here ℹ️ Please run only needed test builds instead of all when developing. Please run all test builds before sending your PR for review. For more details, please, review the Magento Contributor Guide documentation. 🕙 You can find the schedule on the Magento Community Calendar page. 📞 The triage of Pull Requests happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket. 🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel ✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel |
@magento run all tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @mlambley,
I general your changes looks good to me, but I see that webapi tests are failing now, so seems like your change did some regression.
Could you review failing tests and adjust your code changes accordingly?
Also would be good to cover your changes with some kind of tests, I believe integration tests will fit there. Could you do that?
@mlambley I am closing this PR now due to inactivity. |
Hi @mlambley, thank you for your contribution! |
I think this PR should be openend again. |
Description (*)
Cache context has no way to know which items have been cleaned. When an item is added to the context and then cleaned, this is not an issue. But as more items are added and cleaned, those earlier items are cleaned again and again. This results in an exponential performance drain. This PR seeks to remedy this by making all instances of cache context transient.
Fixed Issues (if relevant)
Manual testing scenarios (*)
Before applying these changes, put a debug in
\Magento\Indexer\Model\Indexer\CacheCleaner
looking at the value of$identities
incleanCache()
. Watch the array grow with each product save, with the same identities being cleaned multiple times. Now apply the changes and see the$identities
not grow.Questions or comments
Please give feedback. Thank you.
Contribution checklist (*)