aboutsummaryrefslogtreecommitdiffstats
path: root/includes/utils/BatchRowWriter.php
diff options
context:
space:
mode:
authorBartosz Dziewoński <dziewonski@fastmail.fm>2024-01-22 22:32:48 +0100
committerBartosz Dziewoński <dziewonski@fastmail.fm>2024-01-23 16:34:45 +0100
commit4aebcfe097457adcb4791f1b96720ce6ad7011c1 (patch)
tree881acec405ee69088e0e51efe7e06bbb204d5561 /includes/utils/BatchRowWriter.php
parente4c7272976efb123919fcc96534446bfa1edb18c (diff)
downloadmediawikicore-4aebcfe097457adcb4791f1b96720ce6ad7011c1.tar.gz
mediawikicore-4aebcfe097457adcb4791f1b96720ce6ad7011c1.zip
Change more uses of getDBLoadBalancerFactory() to getConnectionProvider()
Some less trivial cases. Also update variable names. This doesn't really change anything, but I hope it helps promote getConnectionProvider() as the common way to do this. Follow-up to 8604c384f624273f46b653ec252ffaed30e6ff89. Change-Id: I6657d783375fac5c7fa856b884ff1fb09285e94c
Diffstat (limited to 'includes/utils/BatchRowWriter.php')
-rw-r--r--includes/utils/BatchRowWriter.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/includes/utils/BatchRowWriter.php b/includes/utils/BatchRowWriter.php
index a84a413f9460..f03131a78c40 100644
--- a/includes/utils/BatchRowWriter.php
+++ b/includes/utils/BatchRowWriter.php
@@ -77,8 +77,8 @@ class BatchRowWriter {
* @phan-param array<int,array{primaryKey:array,changes:array}> $updates
*/
public function write( array $updates ) {
- $lbFactory = MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
- $ticket = $lbFactory->getEmptyTransactionTicket( __METHOD__ );
+ $dbProvider = MediaWikiServices::getInstance()->getConnectionProvider();
+ $ticket = $dbProvider->getEmptyTransactionTicket( __METHOD__ );
$caller = __METHOD__;
if ( (string)$this->caller !== '' ) {
@@ -93,6 +93,6 @@ class BatchRowWriter {
->caller( $caller )->execute();
}
- $lbFactory->commitAndWaitForReplication( __METHOD__, $ticket );
+ $dbProvider->commitAndWaitForReplication( __METHOD__, $ticket );
}
}