From: Marius Hoch Date: Tue, 19 Jun 2018 17:46:01 +0000 (+0200) Subject: Maintenance::finalSetup: Make sure we re-create LBFactory X-Git-Tag: 1.34.0-rc.0~5014^2 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/%24spUrl?a=commitdiff_plain;h=2bb5329595942860af16869c95f1dd06d49e66ce;p=lhc%2Fweb%2Fwiklou.git Maintenance::finalSetup: Make sure we re-create LBFactory This seems to work anyway (as no connections are needed at this time), but I guess it's more robust to explicitly destroy any existing instances. Bug: T147169 Change-Id: Id56a62d1830fc1464a80dd4420ffddd797bf8b51 --- diff --git a/maintenance/Maintenance.php b/maintenance/Maintenance.php index 39f8c2afee..245bb47399 100644 --- a/maintenance/Maintenance.php +++ b/maintenance/Maintenance.php @@ -1143,6 +1143,8 @@ abstract class Maintenance { } if ( $this->hasOption( 'dbgroupdefault' ) ) { $wgDBDefaultGroup = $this->getOption( 'dbgroupdefault', null ); + + MediaWikiServices::getInstance()->getDBLoadBalancerFactory()->destroy(); } if ( $this->getDbType() == self::DB_ADMIN && isset( $wgDBadminuser ) ) {