summaryrefslogtreecommitdiff
path: root/includes/db/LBFactory.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/db/LBFactory.php')
-rw-r--r--includes/db/LBFactory.php11
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;