From eb79e7b8b869c6b05c869de0283c7b1a9005e860 Mon Sep 17 00:00:00 2001 From: gerritbot Date: Tue, 1 Aug 2023 20:59:02 +0000 Subject: [PATCH] Migrate ILB::getConnectionRef() calls to ILB::getMaintenanceConnectionRef() Deprecated since 1.39 (I6e7544763bd) Remove deprecated ILB::reuseConnection() calls as well Bug: T343277 Change-Id: I477c216fe75bb393fc892ded13f3d117b6fda4aa --- includes/LoginNotify.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/includes/LoginNotify.php b/includes/LoginNotify.php index a1ffc28..5ea1c16 100644 --- a/includes/LoginNotify.php +++ b/includes/LoginNotify.php @@ -290,11 +290,10 @@ class LoginNotify implements LoggerAwareInterface { $lb = MediaWikiServices::getInstance() ->getDBLoadBalancerFactory() ->getMainLB( $wiki ); - $dbrLocal = $lb->getConnectionRef( DB_REPLICA, [], $wiki ); + $dbrLocal = $lb->getMaintenanceConnectionRef( DB_REPLICA, [], $wiki ); if ( !$this->hasCheckUserTables( $dbrLocal ) ) { // Skip this wiki, no checkuser table. - $lb->reuseConnection( $dbrLocal ); continue; } // FIXME The case where there are no CU entries for @@ -306,7 +305,6 @@ class LoginNotify implements LoggerAwareInterface { ); if ( $res === self::USER_KNOWN ) { - $lb->reuseConnection( $dbrLocal ); return $res; } if ( $result === self::USER_NO_INFO @@ -314,7 +312,6 @@ class LoginNotify implements LoggerAwareInterface { ) { $result = self::USER_NOT_KNOWN; } - $lb->reuseConnection( $dbrLocal ); $count++; } }