From 7f24eb5d789966ec7c18c0a612fc9089229d4279 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Wed, 28 Mar 2018 13:49:21 -0700 Subject: [PATCH] Normalize and lower the default DB lag wait timeout Bug: T190960 Change-Id: I49aca118583b20314e6bf82f196f3413571f5bd9 --- includes/GlobalFunctions.php | 2 +- includes/libs/rdbms/lbfactory/LBFactory.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 42a6573257..513f59346c 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -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 === '*' ) { diff --git a/includes/libs/rdbms/lbfactory/LBFactory.php b/includes/libs/rdbms/lbfactory/LBFactory.php index 32886e2f06..bc428ece00 100644 --- a/includes/libs/rdbms/lbfactory/LBFactory.php +++ b/includes/libs/rdbms/lbfactory/LBFactory.php @@ -313,7 +313,7 @@ abstract class LBFactory implements ILBFactory { $opts += [ 'domain' => false, 'cluster' => false, - 'timeout' => 60, + 'timeout' => $this->cliMode ? 60 : 10, 'ifWritesSince' => null ]; -- 2.20.1