From: Aaron Schulz Date: Wed, 7 Sep 2016 04:57:20 +0000 (-0700) Subject: Replace unused LoadBalancer::waitTimeout() method with a config setting X-Git-Tag: 1.31.0-rc.0~5738^2 X-Git-Url: http://git.cyclocoop.org/%22%2C%20generer_url_ecrire%28?a=commitdiff_plain;h=8d0618f842b2b59a22aa37aa6528540c76282cf0;p=lhc%2Fweb%2Fwiklou.git Replace unused LoadBalancer::waitTimeout() method with a config setting Change-Id: Ide390738be0ff537580002501c380a0507dab1e5 --- 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