Minor load balancing improvements
authorTim Starling <tstarling@users.mediawiki.org>
Sat, 15 Jan 2005 10:11:45 +0000 (10:11 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Sat, 15 Jan 2005 10:11:45 +0000 (10:11 +0000)
includes/DefaultSettings.php
includes/Setup.php

index 5943dd0..72df355 100644 (file)
@@ -262,6 +262,9 @@ $wgSharedDB = null;
 # Leave at false to use the single-server variables above
 $wgDBservers           = false; 
 
+# How long to wait for a slave to catch up to the master 
+$wgMasterWaitTimeout = 10;
+
 # Sysop SQL queries
 #   The sql user shouldn't have too many rights other the database, restrict
 #   it to SELECT only on 'cur' table for example
index 33a4ea7..e31aceb 100644 (file)
@@ -92,7 +92,7 @@ global $wgMsgCacheExpiry, $wgCommandLineMode;
 global $wgBlockCache, $wgParserCache, $wgParser, $wgMsgParserOptions;
 global $wgLoadBalancer, $wgDBservers, $wgDebugDumpSql;
 global $wgDBserver, $wgDBuser, $wgDBpassword, $wgDBname, $wgDBtype;
-global $wgUseOldExistenceCheck, $wgEnablePersistentLC;
+global $wgUseOldExistenceCheck, $wgEnablePersistentLC, $wgMasterWaitTimeout;
 
 global $wgFullyInitialised;
 
@@ -204,7 +204,7 @@ if ( !$wgDBservers ) {
                'flags' => ($wgDebugDumpSql ? DBO_DEBUG : 0) | DBO_DEFAULT
        ));
 }
-$wgLoadBalancer = LoadBalancer::newFromParams( $wgDBservers );
+$wgLoadBalancer = LoadBalancer::newFromParams( $wgDBservers, false, $wgMasterWaitTimeout );
 $wgLoadBalancer->loadMasterPos();
 
 wfProfileOut( $fname.'-database' );