From 2bb5329595942860af16869c95f1dd06d49e66ce Mon Sep 17 00:00:00 2001 From: Marius Hoch Date: Tue, 19 Jun 2018 19:46:01 +0200 Subject: [PATCH] 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 --- maintenance/Maintenance.php | 2 ++ 1 file changed, 2 insertions(+) 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 ) ) { -- 2.20.1