Skip to content

Commit 9a321d6

Browse files
committed
removed static failures
1 parent 9eef385 commit 9a321d6

File tree

2 files changed

+12
-19
lines changed

2 files changed

+12
-19
lines changed

app/code/Magento/Catalog/Model/Indexer/Category/Product/Action/Full.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ protected function reindex(): void
205205
private function reindexStore($store): void
206206
{
207207
// Ensure the same adapter instance that created the TEMP table is used for all operations
208-
$this->connection = $this->tableMaintainer->getWriteConnection();
208+
$this->connection = $this->tableMaintainer->getConnection();
209209
$this->reindexRootCategory($store);
210210
$this->reindexAnchorCategories($store);
211211
$this->reindexNonAnchorCategories($store);

app/code/Magento/Catalog/Model/Indexer/Category/Product/TableMaintainer.php

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,15 @@ class TableMaintainer
3535

3636
/**
3737
* Catalog tmp category index table name
38+
*
39+
* @var string
3840
*/
3941
private $tmpTableSuffix = '_tmp';
4042

4143
/**
4244
* Catalog tmp category index table name
45+
*
46+
* @var string
4347
*/
4448
private $additionalTableSuffix = '_replica';
4549

@@ -65,25 +69,14 @@ public function __construct(
6569
*
6670
* @return AdapterInterface
6771
*/
68-
private function getConnection()
72+
public function getConnection()
6973
{
7074
if (!isset($this->connection)) {
7175
$this->connection = $this->resource->getConnection();
7276
}
7377
return $this->connection;
7478
}
7579

76-
/**
77-
* Expose write connection so callers can use the same adapter instance
78-
* that created temporary tables.
79-
*
80-
* @return AdapterInterface
81-
*/
82-
public function getWriteConnection(): AdapterInterface
83-
{
84-
return $this->getConnection();
85-
}
86-
8780
/**
8881
* Return validated table name
8982
*
@@ -131,7 +124,7 @@ private function dropTable($tableName)
131124
/**
132125
* Return main index table name
133126
*
134-
* @param $storeId
127+
* @param int $storeId
135128
*
136129
* @return string
137130
*/
@@ -145,7 +138,7 @@ public function getMainTable(int $storeId)
145138
/**
146139
* Create main and replica index tables for store
147140
*
148-
* @param $storeId
141+
* @param int $storeId
149142
*
150143
* @return void
151144
*
@@ -172,7 +165,7 @@ public function createTablesForStore(int $storeId)
172165
/**
173166
* Drop main and replica index tables for store
174167
*
175-
* @param $storeId
168+
* @param int $storeId
176169
*
177170
* @return void
178171
*/
@@ -188,7 +181,7 @@ public function dropTablesForStore(int $storeId)
188181
/**
189182
* Return replica index table name
190183
*
191-
* @param $storeId
184+
* @param int $storeId
192185
*
193186
* @return string
194187
*/
@@ -200,7 +193,7 @@ public function getMainReplicaTable(int $storeId)
200193
/**
201194
* Create temporary index table for store
202195
*
203-
* @param $storeId
196+
* @param int $storeId
204197
*
205198
* @return void
206199
*/
@@ -217,7 +210,7 @@ public function createMainTmpTable(int $storeId)
217210
/**
218211
* Return temporary index table name
219212
*
220-
* @param $storeId
213+
* @param int $storeId
221214
*
222215
* @return string
223216
*

0 commit comments

Comments
 (0)