Page MenuHomePhabricator

[unusual] Replace LoadBalancer in client's ChangesListSpecialPageHookHandler
Closed, ResolvedPublic

Description

ChangesListSpecialPageHookHandler has only a single call to the load balancer:

$loadBalancer->getLazyConnectionRef( DB_REPLICA ),

but so far ConnectionManager doesn't seem to have the corresponding methods yet.

Event Timeline

Hah, we only use the “connection” for one thing anyways:

$dbr->addQuotes( RecentChangeFactory::SRC_WIKIBASE )

In theory this should be possible even without opening a connection… but in practice, I assume we’re going to have an open connection anyways by the time this code is reached, so it’s probably not worth the effort optimizing this.

Change 700069 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Lucas Werkmeister (WMDE)):

[mediawiki/core@master] Add getLazyReadConnectionRef() to ConnectionManager

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

Change 700070 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Lucas Werkmeister (WMDE)):

[mediawiki/extensions/Wikibase@master] Inject ClientDomainDbFactory into ChangesListSpecialPageHookHandler

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

We really should take out addQuotes from the connection class. It never made any sense and I've been seeing issues like this for years now.

Change 700069 merged by jenkins-bot:

[mediawiki/core@master] Add getLazyReadConnectionRef() to ConnectionManager

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

Change 700070 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Inject ClientDomainDbFactory into ChangesListSpecialPageHookHandler

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