Made JobRunner avoid slave lag more aggressively
authorAaron Schulz <aschulz@wikimedia.org>
Fri, 10 Apr 2015 04:35:06 +0000 (21:35 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Fri, 10 Apr 2015 04:39:29 +0000 (04:39 +0000)
Bug: T95501
Change-Id: Ibba6d2947638a17c86edcdaadf484c7aa45cd1c6

includes/jobqueue/JobRunner.php

index f808a32..1725b74 100644 (file)
@@ -235,7 +235,7 @@ class JobRunner implements LoggerAwareInterface {
                                // This only waits for so long before exiting and letting
                                // other wikis in the farm (on different masters) get a chance.
                                $timePassed = microtime( true ) - $lastTime;
-                               if ( $timePassed >= 5 || $timePassed < 0 ) {
+                               if ( $timePassed >= 3 || $timePassed < 0 ) {
                                        if ( !wfWaitForSlaves( $lastTime, false, '*', 5 ) ) {
                                                $response['reached'] = 'slave-lag-limit';
                                                break;