jenkins-bot has submitted this change and it was merged.

Change subject: Use getConnectionRef() in ExternalStoreDB to avoid connection 
leaks
......................................................................


Use getConnectionRef() in ExternalStoreDB to avoid connection leaks

Change-Id: I3df270241653841a4fb2f65e240aae9d2e0b650f
---
M includes/externalstore/ExternalStoreDB.php
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Legoktm: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/externalstore/ExternalStoreDB.php 
b/includes/externalstore/ExternalStoreDB.php
index 2eae279..7e93299 100644
--- a/includes/externalstore/ExternalStoreDB.php
+++ b/includes/externalstore/ExternalStoreDB.php
@@ -130,7 +130,7 @@
                        wfDebug( "writable external store\n" );
                }
 
-               $db = $lb->getConnection( DB_REPLICA, [], $wiki );
+               $db = $lb->getConnectionRef( DB_REPLICA, [], $wiki );
                $db->clearFlag( DBO_TRX ); // sanity
 
                return $db;
@@ -146,7 +146,7 @@
                $wiki = isset( $this->params['wiki'] ) ? $this->params['wiki'] 
: false;
                $lb = $this->getLoadBalancer( $cluster );
 
-               $db = $lb->getConnection( DB_MASTER, [], $wiki );
+               $db = $lb->getConnectionRef( DB_MASTER, [], $wiki );
                $db->clearFlag( DBO_TRX ); // sanity
 
                return $db;

-- 
To view, visit https://gerrit.wikimedia.org/r/311932
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I3df270241653841a4fb2f65e240aae9d2e0b650f
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <asch...@wikimedia.org>
Gerrit-Reviewer: Legoktm <legoktm.wikipe...@gmail.com>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to