Skip to content

Improve indexers #35685

@Nuranto

Description

@Nuranto

Preconditions and environment

Magento version 2.4.4

Steps to reproduce

  1. Disable crons (to stop reindexing)
  2. Add Color Product attribute for few products
  3. Change indexers to "Update by Schedule" mode
  4. Truncate catalog_product_category_cl table (optional, it's just easier to test with that step)
  5. Open a product in admin area
  6. Change the value for color attribute
  7. Save product

Expected result

catalog_product_category_cl did not changed

Actual result

The product ID is added to catalog_product_category_cl, triggering a totally useless reindex on that product. (And a useless insert into cl table on product save)

Additional information

I used Product Category indexer as an example, but this issue seems to concern other indexer as well.

Subscription model should be refactored so we can edit easily update trigger statements per view, via a plugin for example. For this example (catalog_product_category), that would allow us to filter trigger on a specific attribute_id value(s)

#35685 (comment)

Release note

No response

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: ProductComponent: IndexerIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P3May be fixed according to the position in the backlog.Progress: ready for devReported on 2.4.4Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branch

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions