You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Two indexers with mview configuration, subscribed to the same table but using different "entity_column" values override each other when creating triggers (enabling indexers to work on schedule mode).
For reproduction was used Magento core indexer "Catalog Search" and custom indexer.
Both indexers subscribed to "catalog_product_super_link" table. "Catalog Search" indexer uses "entity_column" value "product_id". Custom indexer uses "entity_column" value "parent_id".
"catalogsearch_fulltext" mview subscription to "catalog_product_super_link" table changes:
On reproduction step 3, after enabling the test indexer to work on schedule mode the following trigger is configured for "catalog_product_super_link" table (e.g insert trigger):
BEGIN
INSERT IGNORE INTO `test_view_id_cl` (`entity_id`) VALUES (NEW.`parent_id`);
END
On reproduction step 4, after enabling the "catalog search" to work on schedule mode the following trigger is configured for "catalog_product_super_link" table (e.g insert trigger):
BEGIN
INSERT IGNORE INTO `catalogsearch_fulltext_cl` (`entity_id`) VALUES (NEW.`product_id`);
INSERT IGNORE INTO `test_view_id_cl` (`entity_id`) VALUES (NEW.`product_id`);
END
Enabling "catalog search" indexer to work on schedule mode rewrote previously created trigger. For "test_view_id_cl" "parent_id" was changed to "product_id".
Expected result (*)
On reproduction step 4, enabling the "catalog search" to work on schedule mode should not rewrite previously created trigger and change "entity_column" for that:
BEGIN
INSERT IGNORE INTO `catalogsearch_fulltext_cl` (`entity_id`) VALUES (NEW.`product_id`);
INSERT IGNORE INTO `test_view_id_cl` (`entity_id`) VALUES (NEW.`parent_id`);
END
Additional Information (*)
CE trigger creation class -> \Magento\Framework\Mview\View\Subscription
EE trigger creation class -> \Magento\CatalogStaging\Model\Mview\View\Attribute\Subscription
The text was updated successfully, but these errors were encountered:
aleksejsbaranovs10
changed the title
Database table trigger creation using multiple table subscriptions with different entity columns
Database table triggers creation using mview multiple subscriptions with different entity columns for one table
Dec 7, 2020
[Linked PR in magento2 project] -> magento/magento2#31192
Issue description
Two indexers with mview configuration, subscribed to the same table but using different "entity_column" values override each other when creating triggers (enabling indexers to work on schedule mode).
For reproduction was used Magento core indexer "Catalog Search" and custom indexer.
Both indexers subscribed to "catalog_product_super_link" table. "Catalog Search" indexer uses "entity_column" value "product_id". Custom indexer uses "entity_column" value "parent_id".
"catalogsearch_fulltext" mview subscription to "catalog_product_super_link" table changes:
Custom indexer mview subscription to "catalog_product_super_link" table changes:
Preconditions (*)
Steps to reproduce (*)
Actual result (*)
Expected result (*)
Additional Information (*)
The text was updated successfully, but these errors were encountered: