-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Show customer_grid indexer as green when realtime #34557
Show customer_grid indexer as green when realtime #34557
Conversation
Hi @fredden. Thank you for your contribution
❗ Automated tests can be triggered manually with an appropriate comment:
You can find more information about the builds here ℹ️ Run only required test builds during development. Run all test builds before sending your pull request for review. For more details, 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, 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 |
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 give me 2.4-develop instance |
Hi @andrewbess. Thank you for your request. I'm working on Magento instance for you. |
Hi @andrewbess, here is your Magento Instance: https://7a8cae9a8339b3e7c12ea6cee75a2808-2-4-develop.instances.magento-community.engineering |
We have experienced confusion related to setting of customer_grid indexer. Adding clarification above screenshot. Also screenshot needs to be updated if magento/magento2#34557 is merged.
Can somebody please verify if the claim is actually correct? We have always had that indexer set to 'update by schedule' and I haven't heard any complaints about our clients that this customer grid is not being updated correctly... |
Yes, please; I'd like confirmation too. I've not witnessed any real-world issues with this (in current versions of Magento) nor the Design Config Grid indexer, but both seem to use the 'dummy' materialised-view, so will never get anything in their (non-existent) changelog tables and therefore won't run an 'incremental' indexer update. I wonder why the Design Config Grid isn't marked as recommended in realtime mode too. This feels inconsistent. Code samples showing 'dummy' mview
magento2/lib/internal/Magento/Framework/Indexer/Action/Dummy.php Lines 11 to 54 in 227cf92
|
It looks like the customer grid indexer gets incremental updates inline within the same process that's doing the 'save' action. magento2/app/code/Magento/Customer/Model/Customer.php Lines 1096 to 1123 in 227cf92
magento2/app/code/Magento/Customer/Model/Address.php Lines 333 to 363 in 227cf92
magento2/app/code/Magento/Customer/Model/Plugin/CustomerGridIndexAfterWebsiteDelete.php Lines 49 to 60 in 227cf92
And the Design Config Grid indexer does a full reindex every time something gets saved. magento2/app/code/Magento/Theme/Model/DesignConfigRepository.php Lines 84 to 131 in 227cf92
So the indexer mode ('realtime' versus 'schedule') shouldn't make any difference to the freshness of the data showing in the grid. Should we therefore mark the mode as neutral whatever it is, rather than preferring one state over the other? |
509fb51
to
08a22ef
Compare
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 |
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. |
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 run Unit Tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues. |
@fredden can you please have a look a static test failure seems to be causing because of the PR changes |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues. |
@magento run WebAPI Tests, Unit Tests,Functional Tests EE,Functional Tests CE,Functional Tests B2B |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues. |
@magento run Unit Tests,WebAPI Tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues. |
@magento run Unit Tests,WebAPI Tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues. |
Failing Test does not seems to be related to PR and are known failure. |
@magento run all tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues. |
@magento run all tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues. |
@magento run WebAPI Tests,Unit Tests,Static Tests, Functional Tests B2B |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues. |
Description
Magento recommends that all indexers be set in
schedule
mode ("Update by Schedule") except forcustomer_grid
which should be inrealtime
mode ("Update on Save"). This is documented here in the devdocs and the Site-Wide Analysis Tool reports this also.Screen-shot of Site-Wide Analysis Tool
Currently Magento renders all indexers as 'green' when they are in
schedule
mode, includingcustomer_grid
. This is misleading as thecustomer_grid
is not in the recommended state when set asschedule
and shows in 'red' when inrealtime
mode which is its recommended state.This pull request makes the colours match the recommended state for each indexer.
Related Pull Requests
None
Fixed Issues
None
Manual testing scenarios
realtime
with:php bin/magento indexer:set-mode realtime
schedule
with:php bin/magento indexer:set-mode schedule
customer_grid
indexer asrealtime
with:php bin/magento indexer:set-mode realtime customer_grid
Screen-shot of indexers all set 'Update on Save'
Screen-shot of indexers all set 'Update by Schedule'
Screen-shot of indexers set to their recommended modes
Questions or comments
I have made the function which determines the preferred mode public to allow for extensibility with plugins.
Should the Design Config Grid indexer also be in this category of 'prefer realtime mode'?
Contribution checklist (*)
Resolved issues: