- Notifications
You must be signed in to change notification settings - Fork 9.4k
Use compiled config for generated data instead of general config #29954
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
Use compiled config for generated data instead of general config #29954
Conversation
…nts, ui, action_list
Hi @ilnytskyi. 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 |
@magento run Functional Tests CE, Functional Tests B2B, Functional Tests EE |
@magento run Functional Tests B2B, Functional Tests EE |
CC @sivaschenko look great with final results |
up |
2 similar comments
up |
up |
up, it's going to be 3 years for this small change |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
@magento create issue |
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.
Hello @ilnytskyi,
Thanks for the contribution!
The changes seem good to me, hence approving the PR.
Thanks
@magento run all tests |
Hi @ilnytskyi, Thank you for your valuable contribution! Can you please elaborate more on the Steps to reproduce. Kindly mention detailed steps in order to reproduce this issue as well as test the given solution in PR. Thank you! |
@engcom-Charlie In case of changing the storage for that case from redis to files in env.php
|
As you have added the compiledConfig classes in the di.xml for the instance-sensetive cache. This PR can be verified by looking at the cache generated in the var/cache directory. Please let us know if we can proceed with this approach. |
@engcom-November yes I think your suggested approach is also viable |
Hello @ilnytskyi, Thank you for the collaboration and contribution. ✔️ QA PassedAs the instance-sensetive cache is moved to compiled config, this can be verified by looking at the cache generated at var/cache directory. As it will have the cache instance of the class. Before: ✖️ After: ✔️ This can be seen with all the four classes that has been moved to compiled config. Thank you. |
@magento run all tests |
@magento run Functional Tests B2B, Functional Tests CE, Functional Tests EE |
The repeating failures in Functional tests B2B, CE and EE are flaky and are known issues. Known issues: Hence moving it to Merge In Progress |
Description (*)
When we used multi-container ASG we noticed that magento loads a lot of data from shared cache instance (Redis).
That during deploys of new containers leads to downtime or unstable behavior during containers swapping.
We decided to move instance-sensetive cache types such as compiled DI, events, to containers itself.
That prevents cache overriding in shared instance while old container is alive a few minutes after deploy.
So we checked what caches lead to such result, and moved some core classes from using shared config type to compiled_config because this data is instance-sensitive and not necessary should be shared.
This also reduses excessive network transfer and overhead of data that depended on certain version of code.
Magento\Framework\Interception\PluginList\PluginList
- if new plugin cached in the shared config, the instance with older version can be down if did not find a new class. New instance may not execude the new code if this cache key was overriden by older container.Magento\Framework\Event\Config\Data
- as above, related to adding new events/observersMagento\Framework\App\Router\ActionList
- as above but related to adding new routes and controllersMagento\Ui\Config\Reader\Definition\Data
- related to new Ui componentsOnce those caches are generated, they are the same until you deploy new version of code.
Related Pull Requests
Fixed Issues (if relevant)
Manual testing scenarios (*)
Questions or comments
Contribution checklist (*)
Resolved issues: