Skip to content

Commit 10bc00f

Browse files
committed
Merge branch 'MC-17513' of https://github.com/magento-tango/magento2ce into pr_2019_07_11
2 parents c164ba2 + fa8fb2a commit 10bc00f

File tree

1 file changed

+8
-1
lines changed
  • app/code/Magento/CatalogInventory/Model/ResourceModel/Indexer/Stock

1 file changed

+8
-1
lines changed

app/code/Magento/CatalogInventory/Model/ResourceModel/Indexer/Stock/DefaultStock.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,7 @@ protected function _prepareIndexTable($entityIds = null)
292292
*/
293293
protected function _updateIndex($entityIds)
294294
{
295+
$this->deleteOldRecords($entityIds);
295296
$connection = $this->getConnection();
296297
$select = $this->_getStockStatusSelect($entityIds, true);
297298
$select = $this->getQueryProcessorComposite()->processQuery($select, $entityIds, true);
@@ -314,14 +315,14 @@ protected function _updateIndex($entityIds)
314315
}
315316
}
316317

317-
$this->deleteOldRecords($entityIds);
318318
$this->_updateIndexTable($data);
319319

320320
return $this;
321321
}
322322

323323
/**
324324
* Delete records by their ids from index table
325+
*
325326
* Used to clean table before re-indexation
326327
*
327328
* @param array $ids
@@ -366,6 +367,8 @@ public function getIdxTable($table = null)
366367
}
367368

368369
/**
370+
* Get status expression
371+
*
369372
* @param AdapterInterface $connection
370373
* @param bool $isAggregate
371374
* @return mixed
@@ -391,6 +394,8 @@ protected function getStatusExpression(AdapterInterface $connection, $isAggregat
391394
}
392395

393396
/**
397+
* Get stock configuration
398+
*
394399
* @return StockConfigurationInterface
395400
*
396401
* @deprecated 100.1.0
@@ -406,6 +411,8 @@ protected function getStockConfiguration()
406411
}
407412

408413
/**
414+
* Get query processor composite
415+
*
409416
* @return QueryProcessorComposite
410417
*/
411418
private function getQueryProcessorComposite()

0 commit comments

Comments
 (0)