Merge "Lowered $maxAllowedLag to 3 in JobRunner"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 22 Apr 2015 14:40:00 +0000 (14:40 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 22 Apr 2015 14:40:00 +0000 (14:40 +0000)
includes/jobqueue/JobRunner.php

index d5262a1..85f9c2c 100644 (file)
@@ -123,8 +123,8 @@ class JobRunner implements LoggerAwareInterface {
                $trxProfiler->setExpectation( 'maxAffected', 500, __METHOD__ );
 
                // Bail out if there is too much DB lag
-               $maxAllowedLag = 5;
-               list( , $maxLag ) = wfGetLBFactory()->getMainLB( wfWikiID() )->getMaxLag();
+               $maxAllowedLag = 3;
+               list( , $maxLag ) = wfGetLB( wfWikiID() )->getMaxLag();
                if ( $maxLag >= $maxAllowedLag ) {
                        $response['reached'] = 'slave-lag-limit';
                        return $response;