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
(from parent 1:
8ba5905
)
Add LBFactory::closeAll() method
author
Brion Vibber
<brion@pobox.com>
Tue, 24 May 2016 15:32:12 +0000
(08:32 -0700)
committer
Aaron Schulz
<aschulz@wikimedia.org>
Wed, 25 May 2016 07:43:23 +0000
(07:43 +0000)
Needed to allow long-running background tasks to close out database
connections in a way that allows them to reopen later when needed
again.
Bug: T97641
Change-Id: I4974b691392d4225b15e7b771a28a2cefeb9d8e4
includes/db/loadbalancer/LBFactory.php
patch
|
blob
|
history
diff --git
a/includes/db/loadbalancer/LBFactory.php
b/includes/db/loadbalancer/LBFactory.php
index
b78793f
..
5b048b5
100644
(file)
--- a/
includes/db/loadbalancer/LBFactory.php
+++ b/
includes/db/loadbalancer/LBFactory.php
@@
-452,6
+452,15
@@
abstract class LBFactory implements DestructibleService {
}
} );
}
+
+ /**
+ * Close all open database connections on all open load balancers.
+ * @since 1.28
+ */
+ public function closeAll() {
+ $this->forEachLBCallMethod( 'closeAll', [] );
+ }
+
}
/**