File tree Expand file tree Collapse file tree 4 files changed +23
-6
lines changed
Model/ResourceModel/Product/Indexer Expand file tree Collapse file tree 4 files changed +23
-6
lines changed Original file line number Diff line number Diff line change 15
15
*/
16
16
class CompositeProductRowSizeEstimator implements IndexTableRowSizeEstimatorInterface
17
17
{
18
+ /**
19
+ * Calculated memory size for one record in catalog_product_index_price table
20
+ */
21
+ const MEMORY_SIZE_FOR_ONE_ROW = 200 ;
22
+
18
23
/**
19
24
* @var DefaultPrice
20
25
*/
@@ -76,8 +81,8 @@ public function estimateRowSize()
76
81
* $maxRelatedProductCount - maximum number of related products
77
82
* $websitesCount - active websites
78
83
* $customerGroupCount - active customer groups
79
- * 200 - calculated memory size for one record in catalog_product_index_price table
84
+ * MEMORY_SIZE_FOR_ONE_ROW - calculated memory size for one record in catalog_product_index_price table
80
85
*/
81
- return ceil ($ maxRelatedProductCount * $ websitesCount * $ customerGroupCount * 200 );
86
+ return ceil ($ maxRelatedProductCount * $ websitesCount * $ customerGroupCount * self :: MEMORY_SIZE_FOR_ONE_ROW );
82
87
}
83
88
}
Original file line number Diff line number Diff line change 12
12
*/
13
13
class IndexTableRowSizeEstimator implements \Magento \Framework \Indexer \IndexTableRowSizeEstimatorInterface
14
14
{
15
+ /**
16
+ * Calculated memory size for one record in catalog_product_index_price table
17
+ */
18
+ const MEMORY_SIZE_FOR_ONE_ROW = 120 ;
19
+
15
20
/**
16
21
* @var \Magento\Store\Api\WebsiteManagementInterface
17
22
*/
@@ -51,8 +56,8 @@ public function estimateRowSize()
51
56
*
52
57
* $websitesCount - active websites
53
58
* $customerGroupCount - active customer groups
54
- * 120 - calculated memory size for one record in catalog_product_index_price table
59
+ * MEMORY_SIZE_FOR_ONE_ROW - calculated memory size for one record in catalog_product_index_price table
55
60
*/
56
- return ceil ($ websitesCount * $ customerGroupCount * 120 );
61
+ return ceil ($ websitesCount * $ customerGroupCount * self :: MEMORY_SIZE_FOR_ONE_ROW );
57
62
}
58
63
}
Original file line number Diff line number Diff line change 11
11
*/
12
12
class TemporaryTableStrategy implements \Magento \Framework \Indexer \Table \StrategyInterface
13
13
{
14
+ /**
15
+ * Suffix for new temporary table
16
+ */
14
17
const TEMP_SUFFIX = '_temp ' ;
15
18
16
19
/**
@@ -31,7 +34,7 @@ class TemporaryTableStrategy implements \Magento\Framework\Indexer\Table\Strateg
31
34
* @param \Magento\Framework\App\ResourceConnection $resource
32
35
*/
33
36
public function __construct (
34
- \Magento \Framework \Indexer \Table \Strategy $ strategy ,
37
+ \Magento \Framework \Indexer \Table \StrategyInterface $ strategy ,
35
38
\Magento \Framework \App \ResourceConnection $ resource
36
39
) {
37
40
$ this ->strategy = $ strategy ;
Original file line number Diff line number Diff line change 947
947
<argument name =" indexerFrontendResource" xsi : type =" object" >Magento\Catalog\Model\ResourceModel\Product\Indexer\Price\FrontendResource</argument >
948
948
</arguments >
949
949
</type >
950
- <type name =" Magento\Catalog\Model\ResourceModel\Product\Indexer\TemporaryTableStrategy" shared =" false" />
950
+ <type name =" Magento\Catalog\Model\ResourceModel\Product\Indexer\TemporaryTableStrategy" shared =" false" >
951
+ <arguments >
952
+ <argument name =" strategy" xsi : type =" object" >Magento\Framework\Indexer\Table\Strategy</argument >
953
+ </arguments >
954
+ </type >
951
955
<type name =" Magento\Catalog\Model\ResourceModel\Product\Indexer\Price\DefaultPrice" >
952
956
<arguments >
953
957
<argument name =" tableStrategy" xsi : type =" object" >Magento\Catalog\Model\ResourceModel\Product\Indexer\TemporaryTableStrategy</argument >
You can’t perform that action at this time.
0 commit comments