Skip to content

Commit 3a34014

Browse files
committed
MCP-946: Price Index Optimization
-Fix Static tests;
1 parent b711f33 commit 3a34014

File tree

6 files changed

+9
-21
lines changed

6 files changed

+9
-21
lines changed

app/code/Magento/Bundle/Model/ResourceModel/Indexer/Price/DisabledProductOptionPriceModifier.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,8 @@ private function isBundle(int $entityId): bool
136136
return $this->isBundle[$entityId];
137137
}
138138

139-
/**
139+
/** Get Bundle Ids
140+
*
140141
* @param array $entityIds
141142
* @return \Traversable
142143
*/

app/code/Magento/Catalog/Model/Indexer/Product/Price/AbstractAction.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ abstract class AbstractAction
6161
protected $_storeManager;
6262

6363
/**
64-
* Currency factory
6564
*
6665
* @var CurrencyFactory
6766
*/
@@ -83,7 +82,6 @@ abstract class AbstractAction
8382
protected $_catalogProductType;
8483

8584
/**
86-
* Indexer price factory
8785
*
8886
* @var Factory
8987
*/

app/code/Magento/Catalog/Model/ResourceModel/Product/Indexer/Price/Query/BaseFinalPrice.php

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,6 @@ public function getQuery(array $dimensions, string $productType, array $entityId
136136
$taxClassId = new \Zend_Db_Expr(0);
137137
}
138138

139-
140139
$this->joinAttributeProcessor->process($select, 'status', Status::STATUS_ENABLED);
141140

142141
$price = $this->joinAttributeProcessor->process($select, 'price');
@@ -169,10 +168,10 @@ public function getQuery(array $dimensions, string $productType, array $entityId
169168
['cg' => $this->getTable('customer_group')],
170169
array_key_exists(CustomerGroupDimensionProvider::DIMENSION_NAME, $dimensions)
171170
? sprintf(
172-
'%s = %s',
173-
$this->dimensionToFieldMapper[CustomerGroupDimensionProvider::DIMENSION_NAME],
174-
$dimensions[CustomerGroupDimensionProvider::DIMENSION_NAME]->getValue()
175-
) : '',
171+
'%s = %s',
172+
$this->dimensionToFieldMapper[CustomerGroupDimensionProvider::DIMENSION_NAME],
173+
$dimensions[CustomerGroupDimensionProvider::DIMENSION_NAME]->getValue()
174+
) : '',
176175
[]
177176
)->joinLeft(
178177
// customer group website limitations
@@ -235,8 +234,6 @@ public function getQuery(array $dimensions, string $productType, array $entityId
235234
$select->where('e.entity_id IN(?)', $entityIds, \Zend_Db::INT_TYPE);
236235
}
237236

238-
239-
240237
/**
241238
* throw event for backward compatibility
242239
*/
@@ -250,8 +247,6 @@ public function getQuery(array $dimensions, string $productType, array $entityId
250247
]
251248
);
252249

253-
// static $p; if (!$p) { echo $select; $p =1; }
254-
// var_dump(__METHOD__, $connection->query($connection->select()->from((clone $select)->having('customer_group_id = 0'), "COUNT(*)"))->fetchColumn());
255250
return $select;
256251
}
257252

app/code/Magento/CatalogSearch/Model/Indexer/Fulltext.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class Fulltext implements
3333
/**
3434
* Indexer ID in configuration
3535
*/
36-
const INDEXER_ID = 'catalogsearch_fulltext';
36+
public const INDEXER_ID = 'catalogsearch_fulltext';
3737

3838
/**
3939
* Default batch size

app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/Full.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class Full
2929
/**
3030
* Scope identifier
3131
*/
32-
const SCOPE_FIELD_NAME = 'scope';
32+
public const SCOPE_FIELD_NAME = 'scope';
3333

3434
/**
3535
* Searchable attributes cache
@@ -79,21 +79,18 @@ class Full
7979
protected $productAttributeCollectionFactory;
8080

8181
/**
82-
* Catalog product status
8382
*
8483
* @var \Magento\Catalog\Model\Product\Attribute\Source\Status
8584
*/
8685
protected $catalogProductStatus;
8786

8887
/**
89-
* Eav config
9088
*
9189
* @var \Magento\Eav\Model\Config
9290
*/
9391
protected $eavConfig;
9492

9593
/**
96-
* Catalog product type
9794
*
9895
* @var \Magento\Catalog\Model\Product\Type
9996
* @deprecated 100.1.0 Moved to \Magento\CatalogSearch\Model\Indexer\Fulltext\Action\DataProvider
@@ -117,7 +114,6 @@ class Full
117114
protected $scopeConfig;
118115

119116
/**
120-
* Store manager
121117
*
122118
* @var \Magento\Store\Model\StoreManagerInterface
123119
* @deprecated 100.1.0 Moved to \Magento\CatalogSearch\Model\Indexer\Fulltext\Action\DataProvider
@@ -231,7 +227,7 @@ class Full
231227
* @param \Magento\Framework\Search\Request\DimensionFactory $dimensionFactory
232228
* @param \Magento\Framework\Indexer\ConfigInterface $indexerConfig
233229
* @param null $indexIteratorFactory
234-
* @param \Magento\Framework\EntityManager\MetadataPool|null $metadataPool
230+
* @param \Magento\Framework\EntityManager\MetadataPool $metadataPool
235231
* @param DataProvider|null $dataProvider
236232
* @param int $batchSize
237233
* @param DeploymentConfig|null $deploymentConfig

app/code/Magento/GroupedProduct/Model/ResourceModel/Product/Indexer/Price/Grouped.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
<?php
22
/**
3-
* Grouped Products Price Indexer Resource model
4-
*
53
* Copyright © Magento, Inc. All rights reserved.
64
* See COPYING.txt for license details.
75
*/

0 commit comments

Comments
 (0)