Skip to content

reindexList does not use batch processing #25507

Closed
@dmanners

Description

@dmanners

Preconditions (*)

  1. Magento Version 2.2.5
  2. 4000 products,
  3. 41 stores
  4. 42 store groups,
  5. 6 websites,

Steps to reproduce (*)

  1. Programatically reindex a limited set of products with the following,
$productIndexer = $this->indexerRegistry->get(\Magento\Catalog\Model\Indexer\Product\Eav\Processor::INDEXER_ID);
$category = $this->categoryRepository->get(
    $categoryId,
    $storeId
);
$productCollection = $category->getProductCollection();
$productIds = $productCollection->getAllIds();
$productIndexer->reindexList($productIds);

Expected result (*)

  1. Reindex to be successfully completed,

Actual result (*)

  1. Error given: The table 'catalog_product_index_eav_temp' is full

After diving into the issue I noticed that calling $productIndexer->reindexAll(); does not have this problem. It looks like the built in batch processing only happens when reindexing all products and not a sub set.

For full indexing see: https://github.com/magento/magento2/blob/2.3-develop/app/code/Magento/Catalog/Model/Indexer/Product/Eav/Action/Full.php#L112
For partial indexing see: https://github.com/magento/magento2/blob/2.3-develop/app/code/Magento/Catalog/Model/Indexer/Product/Eav/Action/Rows.php#L21

For our case I have added our own batch processing around the reindexList call but I wonder if this is something that should be taken over by the Magento index batching that already gets used.

Metadata

Metadata

Labels

Issue: Format is validGate 1 Passed. Automatic verification of issue format passedTriage: Dev.ExperienceIssue related to Developer Experience and needs help with Triage to Confirm or Reject it

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions