Description
Current process:
Currently the product variant indexer recieves parent product id as input.
The indexer retrieves all the variants of that product from the various variant providers (only configurable implemented so far), no matter what was updated.
The indexer sends out:
List of outdated variant ids to be deleted from catalog storefront storage.
List of variant ids to be imported in catalog storefront storage.
Issues with current approach:
- We reindex all the product variants every time a single option is updated/deleted/added.
- The indexer is currently launched by plugins which is not particularly efficient. Mview doesnt work on catalog_product_relation, because https://stackoverflow.com/questions/26328570/on-delete-cascade-not-firing-trigger ,
so plugins are used to add updated product ids to catalog_data_exporter_product_variants_cl.