Skip to content

Price Indexer Performance Issue With Out of Stock Products #24414

@brucemead

Description

@brucemead

Preconditions (*)

Magento 2.x

Steps to reproduce (*)

  1. Ensure that display out of stock products option is disabled
  2. php bin/magento indexer:reindex catalog_product_price
  3. php bin/magento cron:run --group=index

You'll see because of the lack of a where using $entityIds in https://github.com/magento/magento2/blob/2.3-develop/app/code/Magento/CatalogInventory/Model/Indexer/ProductPriceIndexFilter.php#L87 its executing a the delete for every product every time this method is called.

Expected result (*)

To only delete products which are not in stock filtered by $entityIds supplied.

Actual result (*)

Deletes every product which are not in stock as not where filter implimented.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions