Skip to content

Commit 757fd49

Browse files
author
Stanislav Idolov
committed
MAGETWO-64187: Batch size algorithm
1 parent d8b5f70 commit 757fd49

File tree

8 files changed

+15
-16
lines changed

8 files changed

+15
-16
lines changed

app/code/Magento/Bundle/etc/di.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@
143143
<item name="bundle" xsi:type="number">100000</item>
144144
</argument>
145145
<argument name="estimators" xsi:type="array">
146-
<item name="bundle" xsi:type="object">Magento\Catalog\Model\Indexer\CompositeProductBatchSizeManagement</item>
146+
<item name="bundle" xsi:type="object">Magento\Catalog\Model\Indexer\Price\CompositeProductBatchSizeManagement</item>
147147
</argument>
148148
</arguments>
149149
</type>

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
namespace Magento\Catalog\Model\ResourceModel\Product\Indexer\Price;
88

9-
use Magento\Catalog\Model\ResourceModel\Product\Indexer\IndexTableRowSizeEstimator;
109
use Magento\Framework\Indexer\IndexTableRowSizeEstimatorInterface;
1110

1211
class CompositeProductRowSizeEstimator implements IndexTableRowSizeEstimatorInterface

app/code/Magento/Catalog/Model/ResourceModel/Product/Indexer/IndexTableRowSizeEstimator.php renamed to app/code/Magento/Catalog/Model/ResourceModel/Product/Indexer/Price/IndexTableRowSizeEstimator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* See COPYING.txt for license details.
55
*/
66

7-
namespace Magento\Catalog\Model\ResourceModel\Product\Indexer;
7+
namespace Magento\Catalog\Model\ResourceModel\Product\Indexer\Price;
88

99
class IndexTableRowSizeEstimator implements \Magento\Framework\Indexer\IndexTableRowSizeEstimatorInterface
1010
{

app/code/Magento/Catalog/Test/Unit/Model/ResourceModel/Product/Indexer/Price/CompositeProductRowSizeEstimatorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class CompositeProductRowSizeEstimatorTest extends \PHPUnit_Framework_TestCase
2828
protected function setUp()
2929
{
3030
$this->rowSizeEstimatorMock = $this->getMock(
31-
\Magento\Catalog\Model\ResourceModel\Product\Indexer\IndexTableRowSizeEstimator::class,
31+
\Magento\Catalog\Model\ResourceModel\Product\Indexer\Price\IndexTableRowSizeEstimator::class,
3232
[],
3333
[],
3434
'',

app/code/Magento/Catalog/Test/Unit/Model/ResourceModel/Product/Indexer/IndexTableRowSizeEstimatorTest.php renamed to app/code/Magento/Catalog/Test/Unit/Model/ResourceModel/Product/Indexer/Price/IndexTableRowSizeEstimatorTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
* See COPYING.txt for license details.
55
*/
66

7-
namespace Magento\Catalog\Test\Unit\Model\ResourceModel\Product\Indexer;
7+
namespace Magento\Catalog\Test\Unit\Model\ResourceModel\Product\Indexer\Price;
88

99
class IndexTableRowSizeEstimatorTest extends \PHPUnit_Framework_TestCase
1010
{
1111
/**
12-
* @var \Magento\Catalog\Model\ResourceModel\Product\Indexer\IndexTableRowSizeEstimator
12+
* @var \Magento\Catalog\Model\ResourceModel\Product\Indexer\Price\IndexTableRowSizeEstimator
1313
*/
1414
private $model;
1515

@@ -33,7 +33,7 @@ protected function setUp()
3333
'',
3434
false
3535
);
36-
$this->model = new \Magento\Catalog\Model\ResourceModel\Product\Indexer\IndexTableRowSizeEstimator(
36+
$this->model = new \Magento\Catalog\Model\ResourceModel\Product\Indexer\Price\IndexTableRowSizeEstimator(
3737
$this->websiteManagementMock,
3838
$this->collectionFactoryMock
3939
);

app/code/Magento/Catalog/etc/di.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -922,15 +922,20 @@
922922
<item name="default" xsi:type="number">200000</item>
923923
</argument>
924924
<argument name="estimators" xsi:type="array">
925-
<item name="default" xsi:type="object">\Magento\Framework\Indexer\BatchSizeManagement</item>
925+
<item name="default" xsi:type="object">Magento\Catalog\Model\Indexer\Price\BatchSizeManagement</item>
926926
</argument>
927927
</arguments>
928928
</type>
929-
<virtualType name="Magento\Catalog\Model\Indexer\CompositeProductBatchSizeManagement" type="\Magento\Framework\Indexer\BatchSizeManagement">
929+
<virtualType name="Magento\Catalog\Model\Indexer\Price\CompositeProductBatchSizeManagement" type="\Magento\Framework\Indexer\BatchSizeManagement">
930930
<arguments>
931931
<argument name="rowSizeEstimator" xsi:type="object" shared="false">Magento\Catalog\Model\ResourceModel\Product\Indexer\Price\CompositeProductRowSizeEstimator</argument>
932932
</arguments>
933933
</virtualType>
934+
<virtualType name="Magento\Catalog\Model\Indexer\Price\BatchSizeManagement" type="\Magento\Framework\Indexer\BatchSizeManagement">
935+
<arguments>
936+
<argument name="rowSizeEstimator" xsi:type="object" shared="false">\Magento\Catalog\Model\ResourceModel\Product\Indexer\Price\IndexTableRowSizeEstimator</argument>
937+
</arguments>
938+
</virtualType>
934939
<virtualType name="Magento\Catalog\Model\ResourceModel\Product\Indexer\Price\FrontendResource" type="Magento\Indexer\Model\ResourceModel\FrontendResource">
935940
<arguments>
936941
<argument name="indexerId" xsi:type="const">Magento\Catalog\Model\Indexer\Product\Price\Processor::INDEXER_ID</argument>
@@ -943,9 +948,4 @@
943948
<argument name="indexerFrontendResource" xsi:type="object">Magento\Catalog\Model\ResourceModel\Product\Indexer\Price\FrontendResource</argument>
944949
</arguments>
945950
</type>
946-
<type name="Magento\Framework\Indexer\BatchSizeManagement">
947-
<arguments>
948-
<argument name="rowSizeEstimator" xsi:type="object" shared="false">\Magento\Catalog\Model\ResourceModel\Product\Indexer\IndexTableRowSizeEstimator</argument>
949-
</arguments>
950-
</type>
951951
</config>

app/code/Magento/ConfigurableProduct/etc/di.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@
177177
<item name="configurable" xsi:type="number">100000</item>
178178
</argument>
179179
<argument name="estimators" xsi:type="array">
180-
<item name="configurable" xsi:type="object">Magento\Catalog\Model\Indexer\CompositeProductBatchSizeManagement</item>
180+
<item name="configurable" xsi:type="object">Magento\Catalog\Model\Indexer\Price\CompositeProductBatchSizeManagement</item>
181181
</argument>
182182
</arguments>
183183
</type>

app/code/Magento/GroupedProduct/etc/di.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
<item name="grouped" xsi:type="number">100000</item>
9696
</argument>
9797
<argument name="estimators" xsi:type="array">
98-
<item name="grouped" xsi:type="object">Magento\Catalog\Model\Indexer\CompositeProductBatchSizeManagement</item>
98+
<item name="grouped" xsi:type="object">Magento\Catalog\Model\Indexer\Price\CompositeProductBatchSizeManagement</item>
9999
</argument>
100100
</arguments>
101101
</type>

0 commit comments

Comments
 (0)