Not only was this global unused, it also caused the LoadBalancer
to look for the wrong array key, which would always set
$mWaitTimeout to 10 in the conditional. There is also
a manual function LoadBalancer::waitTimeout() for this.
Change-Id: I4b409ef890bec5aac7f666a2ed3dff9ea8bc14cc
/**
* How long to wait for a slave to catch up to the master
+ * @deprecated since 1.24
*/
$wgMasterWaitTimeout = 10;
* @return LoadBalancer
*/
function newMainLB( $wiki = false ) {
- global $wgDBservers, $wgMasterWaitTimeout;
+ global $wgDBservers;
if ( $wgDBservers ) {
$servers = $wgDBservers;
} else {
return new LoadBalancer( array(
'servers' => $servers,
- 'masterWaitTimeout' => $wgMasterWaitTimeout
) );
}
* @return LoadBalancer
*/
function newLoadBalancer( $template, $loads, $groupLoads ) {
- global $wgMasterWaitTimeout;
$servers = $this->makeServerArray( $template, $loads, $groupLoads );
$lb = new LoadBalancer( array(
'servers' => $servers,
- 'masterWaitTimeout' => $wgMasterWaitTimeout
) );
return $lb;
/**
* @param array $params with keys:
* servers Required. Array of server info structures.
- * masterWaitTimeout Replication lag wait timeout
* loadMonitor Name of a class used to fetch server lag and load.
* @throws MWException
*/
throw new MWException( __CLASS__ . ': missing servers parameter' );
}
$this->mServers = $params['servers'];
-
- if ( isset( $params['waitTimeout'] ) ) {
- $this->mWaitTimeout = $params['waitTimeout'];
- } else {
- $this->mWaitTimeout = 10;
- }
+ $this->mWaitTimeout = 10;
$this->mReadIndex = -1;
$this->mWriteIndex = -1;