File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed
CatalogInventory/Model/Indexer/Stock/Action
Catalog/Model/Indexer/Category/Product Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -430,7 +430,7 @@ protected function prepareSelectsByRange(
430
430
$ field ,
431
431
$ select ,
432
432
$ range ,
433
- \Magento \Framework \DB \Query \BatchIteratorInterface::NON_UNIQUE_FIELD_ITERATOR
433
+ \Magento \Framework \DB \Query \BatchIteratorInterface::UNIQUE_FIELD_ITERATOR
434
434
);
435
435
436
436
$ queries = [];
Original file line number Diff line number Diff line change @@ -149,13 +149,21 @@ public function execute($ids = null): void
149
149
150
150
$ select = $ connection ->select ();
151
151
$ select ->distinct (true );
152
- $ select ->from (['e ' => $ entityMetadata ->getEntityTable ()], $ entityMetadata ->getIdentifierField ());
152
+ $ select ->from (
153
+ [
154
+ 'e ' => $ entityMetadata ->getEntityTable ()
155
+ ],
156
+ $ entityMetadata ->getIdentifierField ()
157
+ )->where (
158
+ 'type_id = ? ' ,
159
+ $ indexer ->getTypeId ()
160
+ );
153
161
154
162
$ batchQueries = $ this ->batchQueryGenerator ->generate (
155
163
$ entityMetadata ->getIdentifierField (),
156
164
$ select ,
157
165
$ batchRowCount ,
158
- BatchIteratorInterface::NON_UNIQUE_FIELD_ITERATOR
166
+ BatchIteratorInterface::UNIQUE_FIELD_ITERATOR
159
167
);
160
168
161
169
foreach ($ batchQueries as $ query ) {
You can’t perform that action at this time.
0 commit comments