-
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
Set default indexer mode to 'schedule' #36347
Set default indexer mode to 'schedule' #36347
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. ✏️ 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 run all tests |
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 |
As per PO confirmation prioritizing this PR as P1. |
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. |
1 similar comment
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. |
Additionally - not sure if this is in scope of this PR - it would nice if an indexer definition could specify what its default mode should be the first time it gets setup. I seem to remember a particular 3rd party module from Amasty that comes with a couple of indexers where they strongly recommend to keep them set at 'Update on Save' (I can't find that recommendation anymore at the moment..., so not sure how needed this feature would be anymore, but maybe other modules have similar requirements?) |
@hostep that sounds like a good feature to add. I see that as separate from (but related to) this pull request and #34557 (where the preferred mode is shown in the admin - I specifically made |
Hi @fredden, |
…ult-mode-schedule
@ihor-sviziev that's a great question. I've tested this just now. I started with a fresh environment, checked out this branch, and ran For example, DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`magento2`@`%`*/ /*!50003 TRIGGER trg_catalog_category_entity_int_after_insert AFTER INSERT ON catalog_category_entity_int FOR EACH ROW
BEGIN
INSERT IGNORE INTO `catalog_category_product_cl` (`entity_id`) VALUES (NEW.`entity_id`);
END */;;
DELIMITER ; |
Hello @fredden, @ihor-sviziev, @hostep, We have reviewed the PR internally one more time and agreed that since it is introducing additional risks for upgrade process, we should only go forward with the changes impacting only new installations for the time being.
And for the time being we will not be changing our current behavior during upgrade process. So, changes proposed in items 3 and 6 in the list above will not be delivered for the time being. |
Hi @chernenm, |
Hi @ihor-sviziev, The main concern why we do not want to interfere upgrade flow is that by changing all the indexers into "Upgrade by Schedule" mode during the upgrade might potentially break the upgrade flow. If for example some extensions require reindex of their indexers during upgrade and we are resetting indexers state to "Update on Schedule" then before making an upgrade, all the customers need to make sure that crons are properly configured and and up and running, which is currently not a required step for patch release upgrade. Also, if crons are configured to be run every 1 minute, It additional 1 minute of delay, which might not also be expected in the extensions and customizations code, which might also cause additional issues during upgrade flow. |
@chernenm it seems like you have misunderstood the changes in this pull request. You're talking about changing indexer mode during upgrade flow, which is not something that is happening here. Perhaps we can schedule a call about this if you need more information? |
…ult-mode-schedule
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. |
@engcom-Charlie please re-open this pull request. You have misundersood the state of this task. |
…ult-mode-schedule
As mentioned here, moving this PR to On hold. |
@engcom-Charlie what needs to happen so that we can get this merged in? You've marked this as "on hold" but I don't understand what the problem is here. |
Look what just got merged in 2.4-develop today: AC-11421:In existing Magento installation when install third party indexer module set indexers in update by schedule by default:Change default Index mode schedule It's a completely different implementation as the one proposed in this PR, but probably results in the same outcome. What do you think @fredden? |
Hi @fredden, Thanks for your Contribution!! As per the requirement of https://jira.corp.adobe.com/browse/AC-6975 we delivered ‘Indexer default mode was schedule after Magento installation only’ and was not working when we install third-party Indexer(Custom Indexer) as default mode was still on save with third-party Indexer(Custom Indexer) Related commits: https://github.com/search?q=repo%3Amagento%2Fmagento2+Arrows_Delivery_07022024&type=commits Based on the Jira ticket, the target version is 2.4.8-beta1. Thanks |
Description
It is recommended that indexers be in the
schedule
("Update by Schedule") mode, and notrealtime
("Update on Save") mode. However, when Magento is installed for the first time, all indexers are by default in the "wrong" mode. This pull request changes the default for new indexers to be in the expected / recommended mode.This change will not impact any existing indexers and therefore existing websites should not notice any impact from this change. If a module with an indexer is installed on an existing website, it will be created with the new default mode:
schedule
.Manual testing scenarios
algolia/algoliasearch-magento-2
)Contribution checklist
Resolved issues: