diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-05-01 15:32:59 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-05-01 15:32:59 -0400 |
commit | 6dc1997577fab2c366781fd7048144935afa0012 (patch) | |
tree | 8918d28c7ab4342f0738985e37af1dfc42d0e93a /includes/db/LBFactory.php | |
parent | 150f94f051128f367bc89f6b7e5f57eb2a69fc62 (diff) | |
parent | fa89acd685cb09cdbe1c64cbb721ec64975bbbc1 (diff) |
Merge commit 'fa89acd'
# Conflicts:
# .gitignore
# extensions/ArchInterWiki.sql
Diffstat (limited to 'includes/db/LBFactory.php')
-rw-r--r-- | includes/db/LBFactory.php | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/includes/db/LBFactory.php b/includes/db/LBFactory.php index 4551e2d7..cf522b20 100644 --- a/includes/db/LBFactory.php +++ b/includes/db/LBFactory.php @@ -178,6 +178,15 @@ abstract class LBFactory { } /** + * Commit on all connections. Done for two reasons: + * 1. To commit changes to the masters. + * 2. To release the snapshot on all connections, master and slave. + */ + public function commitAll() { + $this->forEachLBCallMethod( 'commitAll' ); + } + + /** * Commit changes on all master connections */ public function commitMasterChanges() { @@ -199,7 +208,7 @@ abstract class LBFactory { */ public function hasMasterChanges() { $ret = false; - $this->forEachLB( function ( $lb ) use ( &$ret ) { + $this->forEachLB( function ( LoadBalancer $lb ) use ( &$ret ) { $ret = $ret || $lb->hasMasterChanges(); } ); return $ret; |