Skip to content

Commit 5d93f82

Browse files
committed
MAGETWO-93753: [Forwardport] Implement sharding and parallelization for Price Indexer - part 2
1 parent 053e746 commit 5d93f82

File tree

27 files changed

+117
-31
lines changed

27 files changed

+117
-31
lines changed

app/code/Magento/AdvancedSearch/Model/ResourceModel/Index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class Index extends AbstractDb
5858
* @param Context $context
5959
* @param StoreManagerInterface $storeManager
6060
* @param MetadataPool $metadataPool
61-
* @param null $connectionName
61+
* @param string|null $connectionName
6262
* @param TableResolver|null $tableResolver
6363
* @param DimensionCollectionFactory|null $dimensionCollectionFactory
6464
*/

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,8 @@ public function __construct(
129129

130130
/**
131131
* {@inheritdoc}
132-
*
132+
* @param array $dimensions
133+
* @param \Traversable $entityIds
133134
* @throws \Exception
134135
*/
135136
public function executeByDimensions(array $dimensions, \Traversable $entityIds)
@@ -238,8 +239,8 @@ private function prepareBundleOptionTable()
238239
/**
239240
* Prepare temporary price index data for bundle products by price type
240241
*
241-
* @param array $dimensions
242242
* @param int $priceType
243+
* @param array $dimensions
243244
* @param int|array $entityIds the entity ids limitation
244245
* @return void
245246
* @throws \Exception

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ class ModeSwitcher implements \Magento\Indexer\Model\ModeSwitcherInterface
4848
private $modeSwitcherConfiguration;
4949

5050
/**
51-
* @param TableMaintainer $tableMaintainer
51+
* @param TableMaintainer $tableMaintainer
5252
* @param DimensionCollectionFactory $dimensionCollectionFactory
5353
* @param DimensionModeConfiguration $dimensionModeConfiguration
54-
* @param ModeSwitcherConfiguration $modeSwitcherConfiguration
54+
* @param ModeSwitcherConfiguration $modeSwitcherConfiguration
5555
*/
5656
public function __construct(
5757
TableMaintainer $tableMaintainer,

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ class ModeSwitcherConfiguration
3838
private $indexer;
3939

4040
/**
41-
* @param ConfigInterface $configWriter
41+
* @param ConfigInterface $configWriter
4242
* @param TypeListInterface $cacheTypeList
43-
* @param Indexer $indexer
43+
* @param Indexer $indexer
4444
*/
4545
public function __construct(
4646
ConfigInterface $configWriter,

app/code/Magento/Downloadable/Model/ResourceModel/Indexer/Price.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ public function __construct(
101101

102102
/**
103103
* {@inheritdoc}
104-
*
104+
* @param array $dimensions
105+
* @param \Traversable $entityIds
105106
* @throws \Exception
106107
*/
107108
public function executeByDimensions(array $dimensions, \Traversable $entityIds)

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ public function __construct(
8686

8787
/**
8888
* {@inheritdoc}
89-
*
89+
* @param array $dimensions
90+
* @param \Traversable $entityIds
9091
* @throws \Exception
9192
*/
9293
public function executeByDimensions(array $dimensions, \Traversable $entityIds)

app/code/Magento/Indexer/Console/Command/IndexerSetDimensionsModeCommand.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ class IndexerSetDimensionsModeCommand extends AbstractIndexerCommand
4343
private $dimensionProviders;
4444

4545
/**
46-
* @param ObjectManagerFactory $objectManagerFactory
47-
* @param ScopeConfigInterface $configReader
46+
* @param ObjectManagerFactory $objectManagerFactory
47+
* @param ScopeConfigInterface $configReader
4848
* @param ModeSwitcherInterface[] $dimensionSwitchers
4949
*/
5050
public function __construct(
@@ -70,6 +70,9 @@ protected function configure()
7070

7171
/**
7272
* {@inheritdoc}
73+
* @param InputInterface $input
74+
* @param OutputInterface $output
75+
* @return int
7376
*/
7477
protected function execute(InputInterface $input, OutputInterface $output)
7578
{
@@ -185,7 +188,7 @@ private function validate(InputInterface $input): array
185188
*
186189
* @param string $inputKey
187190
* @param string $inputIndexer
188-
* @param array $acceptedValues
191+
* @param array $acceptedValues
189192
* @return string[]
190193
*/
191194
private function validateArgument(string $inputKey, string $inputIndexer, array $acceptedValues): array

app/code/Magento/Indexer/Console/Command/IndexerShowDimensionsModeCommand.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class IndexerShowDimensionsModeCommand extends AbstractIndexerCommand
4040
/**
4141
* @param ObjectManagerFactory $objectManagerFactory
4242
* @param ScopeConfigInterface $configReader
43-
* @param array $indexers
43+
* @param array $indexers
4444
*/
4545
public function __construct(
4646
ObjectManagerFactory $objectManagerFactory,
@@ -63,8 +63,12 @@ protected function configure()
6363
parent::configure();
6464
}
6565

66+
6667
/**
6768
* {@inheritdoc}
69+
* @param InputInterface $input
70+
* @param OutputInterface $output
71+
* @return int
6872
*/
6973
protected function execute(InputInterface $input, OutputInterface $output)
7074
{
@@ -134,8 +138,8 @@ private function validate(InputInterface $input): array
134138
* Validate command argument and return errors in case if argument is invalid
135139
*
136140
* @param string $inputKey
137-
* @param array $inputIndexer
138-
* @param array $acceptedValues
141+
* @param array $inputIndexer
142+
* @param array $acceptedValues
139143
* @return array
140144
*/
141145
private function validateArgument(string $inputKey, array $inputIndexer, array $acceptedValues): array

app/code/Magento/Indexer/Model/DimensionMode.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class DimensionMode
2424

2525
/**
2626
* @param string $name
27-
* @param array $dimensions
27+
* @param array $dimensions
2828
*/
2929
public function __construct(string $name, array $dimensions)
3030
{

app/code/Magento/Indexer/Test/Unit/Console/Command/IndexerSetDimensionsModeCommandTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,10 @@ protected function getObjectManagerReturnValueMap()
9292
/**
9393
* Tests method \Magento\Indexer\Console\Command\IndexerDimensionsModeCommand::execute
9494
*
95-
* @param $indexerTitle
96-
* @param $previousMode
97-
* @param $command
98-
* @param $consoleOutput
95+
* @param string $indexerTitle
96+
* @param string $previousMode
97+
* @param string $command
98+
* @param string $consoleOutput
9999
* @dataProvider dimensionModesDataProvider
100100
* @return void
101101
*/

0 commit comments

Comments
 (0)