From 8d0618f842b2b59a22aa37aa6528540c76282cf0 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Tue, 6 Sep 2016 21:57:20 -0700 Subject: [PATCH] Replace unused LoadBalancer::waitTimeout() method with a config setting Change-Id: Ide390738be0ff537580002501c380a0507dab1e5 --- includes/db/loadbalancer/LoadBalancer.php | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/includes/db/loadbalancer/LoadBalancer.php b/includes/db/loadbalancer/LoadBalancer.php index 71286a976f..16774b7e09 100644 --- a/includes/db/loadbalancer/LoadBalancer.php +++ b/includes/db/loadbalancer/LoadBalancer.php @@ -94,6 +94,7 @@ class LoadBalancer { * - servers : Required. Array of server info structures. * - loadMonitor : Name of a class used to fetch server lag and load. * - readOnlyReason : Reason the master DB is read-only if so [optional] + * - waitTimeout : Maximum time to wait for replicas for consistency [optional] * - srvCache : BagOStuff object [optional] * - wanCache : WANObjectCache object [optional] * @throws MWException @@ -103,7 +104,9 @@ class LoadBalancer { throw new MWException( __CLASS__ . ': missing servers parameter' ); } $this->mServers = $params['servers']; - $this->mWaitTimeout = self::POS_WAIT_TIMEOUT; + $this->mWaitTimeout = isset( $params['waitTimeout'] ) + ? $params['waitTimeout'] + : self::POS_WAIT_TIMEOUT; $this->mReadIndex = -1; $this->mWriteIndex = -1; @@ -1413,14 +1416,6 @@ class LoadBalancer { return $fnames; } - /** - * @param mixed $value - * @return mixed - */ - public function waitTimeout( $value = null ) { - return wfSetVar( $this->mWaitTimeout, $value ); - } - /** * @note This method will trigger a DB connection if not yet done * @param string|bool $wiki Wiki ID, or false for the current wiki -- 2.20.1