Use waitForAll() for slow JobRunner commits
authorAaron Schulz <aschulz@wikimedia.org>
Thu, 11 Aug 2016 16:40:36 +0000 (09:40 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Sat, 13 Aug 2016 03:45:00 +0000 (20:45 -0700)
Using waitForOne() barely goes beyond semi-sync replication
already in place on serious DB clusters.

Change-Id: Idb719deaa5993bc2f818cd110d49d09567e0afb3

includes/jobqueue/JobRunner.php

index a132dc5..4b906a7 100644 (file)
@@ -522,10 +522,10 @@ class JobRunner implements LoggerAwareInterface {
                        // This will trigger a rollback in the main loop
                        throw new DBError( $dbwSerial, "Timed out waiting on commit queue." );
                }
-               // Wait for the generic slave to catch up
+               // Wait for the slave DBs to catch up
                $pos = $lb->getMasterPos();
                if ( $pos ) {
-                       $lb->waitForOne( $pos );
+                       $lb->waitForAll( $pos );
                }
 
                $fname = __METHOD__;