Normalize and lower the default DB lag wait timeout
authorAaron Schulz <aschulz@wikimedia.org>
Wed, 28 Mar 2018 20:49:21 +0000 (13:49 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Wed, 28 Mar 2018 20:49:25 +0000 (13:49 -0700)
Bug: T190960
Change-Id: I49aca118583b20314e6bf82f196f3413571f5bd9

includes/GlobalFunctions.php
includes/libs/rdbms/lbfactory/LBFactory.php

index 42a6573..513f593 100644 (file)
@@ -3019,7 +3019,7 @@ function wfWaitForSlaves(
        $ifWritesSince = null, $wiki = false, $cluster = false, $timeout = null
 ) {
        if ( $timeout === null ) {
-               $timeout = wfIsCLI() ? 86400 : 10;
+               $timeout = wfIsCLI() ? 60 : 10;
        }
 
        if ( $cluster === '*' ) {
index 32886e2..bc428ec 100644 (file)
@@ -313,7 +313,7 @@ abstract class LBFactory implements ILBFactory {
                $opts += [
                        'domain' => false,
                        'cluster' => false,
-                       'timeout' => 60,
+                       'timeout' => $this->cliMode ? 60 : 10,
                        'ifWritesSince' => null
                ];