Page MenuHomePhabricator

Replace LBFactory with injecting new Db-Service in Client's BulkSubscriptionUpdater and UpdateSubscriptions maint script
Closed, ResolvedPublic

Description

BulkSubscriptionUpdater uses LBFactory only to wait for replication by calling

$this->lbFactory->waitForReplication( [ 'domain' => $this->repoWiki ] );

It is created in the UpdateSubscriptions maintenance script which also uses it to get a ILoadBalancer instance to create core SessionConsistentConnectionManager instances

$lbFactory = MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
$updater = new BulkSubscriptionUpdater(
	$lbFactory,
	new SessionConsistentConnectionManager( $lbFactory->getMainLB() ),
	new SessionConsistentConnectionManager( $lbFactory->getMainLB( $repoDB ), $repoDB ),
	$clientId,
	$repoDB,
	$this->mBatchSize
);

I'm not perfectly sure what to do with that yet.

Event Timeline

Michael renamed this task from Replace LBFactory with injecting new Db-Service in Client's BulkSubscriptionUpdater to Replace LBFactory with injecting new Db-Service in Client's BulkSubscriptionUpdater and UpdateSubscriptions maint script.May 21 2021, 10:44 AM
Michael updated the task description. (Show Details)

Change 697795 had a related patch set uploaded (by Michael Große; author: Michael Große):

[mediawiki/extensions/Wikibase@master] Use DomainDb abstraction updateSubscription Maint. script

https://gerrit.wikimedia.org/r/697795

Change 697795 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Use DomainDb abstraction updateSubscription Maint. script

https://gerrit.wikimedia.org/r/697795