Page MenuHomePhabricator

Adapt Interlanguage Extension for DB replication and Load Balancing
Closed, ResolvedPublic

Description

In Bug #15607 comment #60, Tim outlines the problem that must be solved before the InterLanguage extension can be deployed on WMF wiki's. Opening a new bug for this to make separate issues easier to track:

We can't enable extensions that don't allow DB replication and load balancing.
CentralAuth and the commons file repo were migrated to use LBFactory long ago.
This extension seems to be based on those modules before they were migrated.

Basically, instead of configuring complete DB constructor parameters, you just
need a DB name, and the rest is done in $wgLBFactoryConf. Then to get a
connection, use:

$lb = wfGetLB( $dbname );
$dbw = $lb->getDB( DB_MASTER, array(), $dbname );
$dbr = $lb->getDB( DB_SLAVE, array(), $dbname );


Version: unspecified
Severity: enhancement

Details

Reference
bz28194