Skip to content

Commit 9d16144

Browse files
committed
MC-19652: Product Categories Indexer stuck
1 parent bf6b166 commit 9d16144

File tree

1 file changed

+6
-2
lines changed
  • app/code/Magento/Catalog/Model/Indexer/Product/Category/Action

1 file changed

+6
-2
lines changed

app/code/Magento/Catalog/Model/Indexer/Product/Category/Action/Rows.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,12 @@ private function getProductIdsWithParents(array $childProductIds)
123123
);
124124

125125
$parentProductIds = $this->connection->fetchCol($select);
126+
$ids = array_unique(array_merge($childProductIds, $parentProductIds));
127+
foreach ($ids as $key => $id) {
128+
$ids[$key] = (int) $id;
129+
}
126130

127-
return array_unique(array_merge($childProductIds, $parentProductIds));
131+
return $ids;
128132
}
129133

130134
/**
@@ -175,7 +179,7 @@ protected function removeEntries()
175179
protected function getNonAnchorCategoriesSelect(\Magento\Store\Model\Store $store)
176180
{
177181
$select = parent::getNonAnchorCategoriesSelect($store);
178-
return $select->where('ccp.product_id IN (?) OR relation.child_id IN (?)', $this->limitationByProducts);
182+
return $select->where('ccp.product_id IN (?)', $this->limitationByProducts);
179183
}
180184

181185
/**

0 commit comments

Comments
 (0)