dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
24c0261
)
Use getConnectionRef() in ExternalStoreDB to avoid connection leaks
author
Aaron Schulz
<aschulz@wikimedia.org>
Wed, 21 Sep 2016 07:58:14 +0000
(
00:58
-0700)
committer
Aaron Schulz
<aschulz@wikimedia.org>
Wed, 21 Sep 2016 08:01:00 +0000
(08:01 +0000)
Change-Id: I3df270241653841a4fb2f65e240aae9d2e0b650f
includes/externalstore/ExternalStoreDB.php
patch
|
blob
|
history
diff --git
a/includes/externalstore/ExternalStoreDB.php
b/includes/externalstore/ExternalStoreDB.php
index
2eae279
..
7e93299
100644
(file)
--- a/
includes/externalstore/ExternalStoreDB.php
+++ b/
includes/externalstore/ExternalStoreDB.php
@@
-130,7
+130,7
@@
class ExternalStoreDB extends ExternalStoreMedium {
wfDebug( "writable external store\n" );
}
- $db = $lb->getConnection( DB_REPLICA, [], $wiki );
+ $db = $lb->getConnection
Ref
( DB_REPLICA, [], $wiki );
$db->clearFlag( DBO_TRX ); // sanity
return $db;
@@
-146,7
+146,7
@@
class ExternalStoreDB extends ExternalStoreMedium {
$wiki = isset( $this->params['wiki'] ) ? $this->params['wiki'] : false;
$lb = $this->getLoadBalancer( $cluster );
- $db = $lb->getConnection( DB_MASTER, [], $wiki );
+ $db = $lb->getConnection
Ref
( DB_MASTER, [], $wiki );
$db->clearFlag( DBO_TRX ); // sanity
return $db;