aboutsummaryrefslogtreecommitdiffstats
path: root/maintenance
diff options
context:
space:
mode:
Diffstat (limited to 'maintenance')
-rw-r--r--maintenance/archives/upgradeLogging.php2
-rw-r--r--maintenance/convertUserOptions.php2
-rw-r--r--maintenance/deleteBatch.php2
-rw-r--r--maintenance/deleteDefaultMessages.php2
-rw-r--r--maintenance/deleteSelfExternals.php2
-rw-r--r--maintenance/gearman/gearmanWorker.php2
-rw-r--r--maintenance/importDump.php2
-rw-r--r--maintenance/importImages.php4
-rw-r--r--maintenance/initEditCount.php2
-rw-r--r--maintenance/migrateUserGroup.php2
-rw-r--r--maintenance/moveBatch.php2
-rw-r--r--maintenance/populateCategory.php2
-rw-r--r--maintenance/populateLogSearch.php2
-rw-r--r--maintenance/populateLogUsertext.php2
-rw-r--r--maintenance/populateParentId.php2
-rw-r--r--maintenance/populateRevisionLength.php2
-rw-r--r--maintenance/populateSha1.php2
-rw-r--r--maintenance/rebuildFileCache.php2
-rw-r--r--maintenance/refreshLinks.php12
-rw-r--r--maintenance/runBatchedQuery.php2
-rw-r--r--maintenance/runJobs.php2
-rw-r--r--maintenance/storage/compressOld.inc4
-rw-r--r--maintenance/storage/fixBug20757.php2
-rw-r--r--maintenance/storage/moveToExternal.php2
-rw-r--r--maintenance/storage/resolveStubs.php2
-rw-r--r--maintenance/storage/trackBlobs.php4
-rw-r--r--maintenance/updateRestrictions.php2
-rw-r--r--maintenance/updateSpecialPages.php4
-rw-r--r--maintenance/upgrade1_5.php3
29 files changed, 38 insertions, 39 deletions
diff --git a/maintenance/archives/upgradeLogging.php b/maintenance/archives/upgradeLogging.php
index d920639577fe..1765bd9f107c 100644
--- a/maintenance/archives/upgradeLogging.php
+++ b/maintenance/archives/upgradeLogging.php
@@ -164,7 +164,7 @@ EOT;
$this->dbw->insert( $dstTable, $batch, __METHOD__ );
$numRowsCopied += count( $batch );
- wfWaitForSlaves( 5 );
+ wfWaitForSlaves();
}
echo "Copied $numRowsCopied rows\n";
}
diff --git a/maintenance/convertUserOptions.php b/maintenance/convertUserOptions.php
index 278d40ff3037..f46f710d8ccb 100644
--- a/maintenance/convertUserOptions.php
+++ b/maintenance/convertUserOptions.php
@@ -46,7 +46,7 @@ class ConvertUserOptions extends Maintenance {
$id = $this->convertOptionBatch( $res, $dbw );
$dbw->commit();
- wfWaitForSlaves( 1 );
+ wfWaitForSlaves();
if ( $id )
$this->output( "--Converted to ID $id\n" );
diff --git a/maintenance/deleteBatch.php b/maintenance/deleteBatch.php
index c8bb4803c301..f5f850a7691a 100644
--- a/maintenance/deleteBatch.php
+++ b/maintenance/deleteBatch.php
@@ -104,7 +104,7 @@ class DeleteBatch extends Maintenance {
if ( $interval ) {
sleep( $interval );
}
- wfWaitForSlaves( 5 );
+ wfWaitForSlaves();
}
}
}
diff --git a/maintenance/deleteDefaultMessages.php b/maintenance/deleteDefaultMessages.php
index fc482ac007fd..e5185090514e 100644
--- a/maintenance/deleteDefaultMessages.php
+++ b/maintenance/deleteDefaultMessages.php
@@ -64,7 +64,7 @@ class DeleteDefaultMessages extends Maintenance {
foreach ( $res as $row ) {
if ( function_exists( 'wfWaitForSlaves' ) ) {
- wfWaitForSlaves( 5 );
+ wfWaitForSlaves();
}
$dbw->ping();
$title = Title::makeTitle( $row->page_namespace, $row->page_title );
diff --git a/maintenance/deleteSelfExternals.php b/maintenance/deleteSelfExternals.php
index db23e92c8851..4e9f54f2c7ba 100644
--- a/maintenance/deleteSelfExternals.php
+++ b/maintenance/deleteSelfExternals.php
@@ -39,7 +39,7 @@ class DeleteSelfExternals extends Maintenance {
$this->output( "Deleting self externals from $wgServer\n" );
$db = wfGetDB( DB_MASTER );
while ( 1 ) {
- wfWaitForSlaves( 2 );
+ wfWaitForSlaves();
$db->commit();
$q = $db->limitResult( "DELETE /* deleteSelfExternals */ FROM externallinks WHERE el_to"
. $db->buildLike( $wgServer . '/', $db->anyString() ), $this->mBatchSize );
diff --git a/maintenance/gearman/gearmanWorker.php b/maintenance/gearman/gearmanWorker.php
index aea126a7178b..3ea100818c16 100644
--- a/maintenance/gearman/gearmanWorker.php
+++ b/maintenance/gearman/gearmanWorker.php
@@ -36,7 +36,7 @@ function wfGearmanMonitor( $idle, $lastJob ) {
$interval = 5;
$now = time();
if ( $now - $lastSleep >= $interval ) {
- wfWaitForSlaves( $interval );
+ wfWaitForSlaves();
$lastSleep = $now;
}
return false;
diff --git a/maintenance/importDump.php b/maintenance/importDump.php
index 71cfbc0603ed..5397959e746b 100644
--- a/maintenance/importDump.php
+++ b/maintenance/importDump.php
@@ -154,7 +154,7 @@ class BackupReader {
$this->progress( "$this->revCount ($revrate revs/sec)" );
}
}
- wfWaitForSlaves( 5 );
+ wfWaitForSlaves();
// XXX: Don't let deferred jobs array get absurdly large (bug 24375)
wfDoUpdates( 'commit' );
}
diff --git a/maintenance/importImages.php b/maintenance/importImages.php
index cc713db0ce4d..47dc3cc0649c 100644
--- a/maintenance/importImages.php
+++ b/maintenance/importImages.php
@@ -249,8 +249,8 @@ if ( count( $args ) > 0 ) {
$article = new Article( $title );
echo "\nWaiting for slaves...\n";
// Wait for slaves.
- sleep( 2.0 );
- wfWaitForSlaves( 1.0 );
+ sleep( 2.0 ); # Why this sleep?
+ wfWaitForSlaves();
echo( "\nSetting image restrictions ... " );
if ( $article->updateRestrictions( $restrictions ) )
diff --git a/maintenance/initEditCount.php b/maintenance/initEditCount.php
index e421e29bf8ea..0f136450fe81 100644
--- a/maintenance/initEditCount.php
+++ b/maintenance/initEditCount.php
@@ -93,7 +93,7 @@ in the load balancer, usually indicating a replication environment.' );
$delta,
$rate ) );
- wfWaitForSlaves( 10 );
+ wfWaitForSlaves();
}
} else {
// Subselect should work on modern MySQLs etc
diff --git a/maintenance/migrateUserGroup.php b/maintenance/migrateUserGroup.php
index c41632086f23..771ed947e93c 100644
--- a/maintenance/migrateUserGroup.php
+++ b/maintenance/migrateUserGroup.php
@@ -60,7 +60,7 @@ class MigrateUserGroup extends Maintenance {
$dbw->commit();
$blockStart += $this->mBatchSize;
$blockEnd += $this->mBatchSize;
- wfWaitForSlaves( 5 );
+ wfWaitForSlaves();
}
$this->output( "Done! $count user(s) in group '$oldGroup' are now in '$newGroup' instead.\n" );
}
diff --git a/maintenance/moveBatch.php b/maintenance/moveBatch.php
index c749533841a6..9b9f91051984 100644
--- a/maintenance/moveBatch.php
+++ b/maintenance/moveBatch.php
@@ -101,7 +101,7 @@ class MoveBatch extends Maintenance {
if ( $interval ) {
sleep( $interval );
}
- wfWaitForSlaves( 5 );
+ wfWaitForSlaves();
}
}
}
diff --git a/maintenance/populateCategory.php b/maintenance/populateCategory.php
index ce0765c9aa4e..13b77fa8622c 100644
--- a/maintenance/populateCategory.php
+++ b/maintenance/populateCategory.php
@@ -119,7 +119,7 @@ TEXT;
++$i;
if ( !( $i % self::REPORTING_INTERVAL ) ) {
$this->output( "$name\n" );
- wfWaitForSlaves( $maxlag );
+ wfWaitForSlaves();
}
usleep( $throttle * 1000 );
}
diff --git a/maintenance/populateLogSearch.php b/maintenance/populateLogSearch.php
index ce2d95ccf13c..894c9ee11586 100644
--- a/maintenance/populateLogSearch.php
+++ b/maintenance/populateLogSearch.php
@@ -130,7 +130,7 @@ class PopulateLogSearch extends Maintenance {
}
$blockStart += self::LOG_SEARCH_BATCH_SIZE;
$blockEnd += self::LOG_SEARCH_BATCH_SIZE;
- wfWaitForSlaves( 5 );
+ wfWaitForSlaves();
}
if ( $db->insert(
'updatelog',
diff --git a/maintenance/populateLogUsertext.php b/maintenance/populateLogUsertext.php
index bb3927ce4f7e..af912ad2ea63 100644
--- a/maintenance/populateLogUsertext.php
+++ b/maintenance/populateLogUsertext.php
@@ -59,7 +59,7 @@ class PopulateLogUsertext extends Maintenance {
$db->commit();
$blockStart += $this->mBatchSize;
$blockEnd += $this->mBatchSize;
- wfWaitForSlaves( 5 );
+ wfWaitForSlaves();
}
if ( $db->insert(
'updatelog',
diff --git a/maintenance/populateParentId.php b/maintenance/populateParentId.php
index 387f5a56037f..7cbc267bbc65 100644
--- a/maintenance/populateParentId.php
+++ b/maintenance/populateParentId.php
@@ -98,7 +98,7 @@ class PopulateParentId extends Maintenance {
}
$blockStart += $this->mBatchSize;
$blockEnd += $this->mBatchSize;
- wfWaitForSlaves( 5 );
+ wfWaitForSlaves();
}
$logged = $db->insert( 'updatelog',
array( 'ul_key' => 'populate rev_parent_id' ),
diff --git a/maintenance/populateRevisionLength.php b/maintenance/populateRevisionLength.php
index 0af51dc11318..7ed306e84fd2 100644
--- a/maintenance/populateRevisionLength.php
+++ b/maintenance/populateRevisionLength.php
@@ -78,7 +78,7 @@ class PopulateRevisionLength extends Maintenance {
}
$blockStart += $this->mBatchSize;
$blockEnd += $this->mBatchSize;
- wfWaitForSlaves( 5 );
+ wfWaitForSlaves();
}
$logged = $db->insert( 'updatelog',
array( 'ul_key' => 'populate rev_len' ),
diff --git a/maintenance/populateSha1.php b/maintenance/populateSha1.php
index 1714c0d64cdd..165a6cfe53a9 100644
--- a/maintenance/populateSha1.php
+++ b/maintenance/populateSha1.php
@@ -68,7 +68,7 @@ class PopulateSha1 extends Maintenance {
foreach ( $res as $row ) {
if ( $i % 100 == 0 ) {
$this->output( sprintf( "Done %d of %d, %5.3f%% \r", $i, $numRows, $i / $numRows * 100 ) );
- wfWaitForSlaves( 5 );
+ wfWaitForSlaves();
}
$file = wfLocalFile( $row->img_name );
if ( !$file ) {
diff --git a/maintenance/rebuildFileCache.php b/maintenance/rebuildFileCache.php
index 5028cbe0a40d..4bf64621c2ad 100644
--- a/maintenance/rebuildFileCache.php
+++ b/maintenance/rebuildFileCache.php
@@ -109,7 +109,7 @@ class RebuildFileCache extends Maintenance {
}
$blockStart += $this->mBatchSize;
$blockEnd += $this->mBatchSize;
- wfWaitForSlaves( 5 );
+ wfWaitForSlaves();
}
$this->output( "Done!\n" );
diff --git a/maintenance/refreshLinks.php b/maintenance/refreshLinks.php
index 420f5553a413..8fe4d3ca8596 100644
--- a/maintenance/refreshLinks.php
+++ b/maintenance/refreshLinks.php
@@ -107,7 +107,7 @@ class RefreshLinks extends Maintenance {
foreach ( $res as $row ) {
if ( !( ++$i % $reportingInterval ) ) {
$this->output( "$i\n" );
- wfWaitForSlaves( $maxLag );
+ wfWaitForSlaves();
}
$this->fixRedirect( $row->page_id );
}
@@ -127,7 +127,7 @@ class RefreshLinks extends Maintenance {
foreach ( $res as $row ) {
if ( !( ++$i % $reportingInterval ) ) {
$this->output( "$i\n" );
- wfWaitForSlaves( $maxLag );
+ wfWaitForSlaves();
}
if ( $redirectsOnly ) {
$this->fixRedirect( $row->page_id );
@@ -148,7 +148,7 @@ class RefreshLinks extends Maintenance {
if ( !( $id % $reportingInterval ) ) {
$this->output( "$id\n" );
- wfWaitForSlaves( $maxLag );
+ wfWaitForSlaves();
}
$this->fixRedirect( $id );
}
@@ -161,7 +161,7 @@ class RefreshLinks extends Maintenance {
if ( !( $id % $reportingInterval ) ) {
$this->output( "$id\n" );
- wfWaitForSlaves( $maxLag );
+ wfWaitForSlaves();
}
self::fixLinksFromArticle( $id );
}
@@ -237,7 +237,7 @@ class RefreshLinks extends Maintenance {
* @author Merlijn van Deen <valhallasw@arctus.nl>
*/
private function deleteLinksFromNonexistent( $maxLag = 0, $batchSize = 100 ) {
- wfWaitForSlaves( $maxLag );
+ wfWaitForSlaves();
$dbw = wfGetDB( DB_MASTER );
@@ -273,7 +273,7 @@ class RefreshLinks extends Maintenance {
$counter++;
$list[] = $row->$field;
if ( ( $counter % $batchSize ) == 0 ) {
- wfWaitForSlaves( 5 );
+ wfWaitForSlaves();
$dbw->delete( $table, array( $field => $list ), __METHOD__ );
$this->output( $counter . ".." );
diff --git a/maintenance/runBatchedQuery.php b/maintenance/runBatchedQuery.php
index e641db8c2e24..8d1b53eb95c5 100644
--- a/maintenance/runBatchedQuery.php
+++ b/maintenance/runBatchedQuery.php
@@ -45,7 +45,7 @@ class BatchedQueryRunner extends Maintenance {
$dbw->query( $query, __METHOD__ );
$affected = $dbw->affectedRows();
$this->output( "$affected rows\n" );
- wfWaitForSlaves_masterPos();
+ wfWaitForSlaves();
} while ( $affected > 0 );
}
diff --git a/maintenance/runJobs.php b/maintenance/runJobs.php
index 69c006b54293..0edf7ac934be 100644
--- a/maintenance/runJobs.php
+++ b/maintenance/runJobs.php
@@ -72,7 +72,7 @@ class RunJobs extends Maintenance {
if ( !$job )
break;
- wfWaitForSlaves( 5 );
+ wfWaitForSlaves();
$t = microtime( true );
$offset = $job->id;
$status = $job->run();
diff --git a/maintenance/storage/compressOld.inc b/maintenance/storage/compressOld.inc
index 187e97692641..02e85cbd5785 100644
--- a/maintenance/storage/compressOld.inc
+++ b/maintenance/storage/compressOld.inc
@@ -155,7 +155,7 @@ function compressWithConcat( $startId, $maxChunkSize, $beginDate,
#$conds[] = 'page_id=rev_page AND rev_id != page_latest';
for ( $pageId = $startId; $pageId <= $maxPageId; $pageId++ ) {
- wfWaitForSlaves( 5 );
+ wfWaitForSlaves();
# Wake up
$dbr->ping();
@@ -309,7 +309,7 @@ function compressWithConcat( $startId, $maxChunkSize, $beginDate,
print "/";
$dbw->commit();
$i += $thisChunkSize;
- wfWaitForSlaves( 5 );
+ wfWaitForSlaves();
}
print "\n";
}
diff --git a/maintenance/storage/fixBug20757.php b/maintenance/storage/fixBug20757.php
index d04a24ffd18c..b6def2dab90f 100644
--- a/maintenance/storage/fixBug20757.php
+++ b/maintenance/storage/fixBug20757.php
@@ -260,7 +260,7 @@ class FixBug20757 extends Maintenance {
static $iteration = 0;
++$iteration;
if ( ++$iteration > 50 == 0 ) {
- wfWaitForSlaves( 5 );
+ wfWaitForSlaves();
$iteration = 0;
}
}
diff --git a/maintenance/storage/moveToExternal.php b/maintenance/storage/moveToExternal.php
index 5ce225c4ff80..64f3adaa6626 100644
--- a/maintenance/storage/moveToExternal.php
+++ b/maintenance/storage/moveToExternal.php
@@ -66,7 +66,7 @@ function moveToExternal( $cluster, $maxID, $minID = 1 ) {
if ( !( $block % REPORTING_INTERVAL ) ) {
print "oldid=$blockStart, moved=$numMoved\n";
- wfWaitForSlaves( 2 );
+ wfWaitForSlaves();
}
$res = $dbr->select( 'text', array( 'old_id', 'old_flags', 'old_text' ),
diff --git a/maintenance/storage/resolveStubs.php b/maintenance/storage/resolveStubs.php
index fad4590a0797..08d0ee04f6d7 100644
--- a/maintenance/storage/resolveStubs.php
+++ b/maintenance/storage/resolveStubs.php
@@ -45,7 +45,7 @@ function resolveStubs() {
$numBlocks = intval( $maxID / $blockSize ) + 1;
for ( $b = 0; $b < $numBlocks; $b++ ) {
- wfWaitForSlaves( 2 );
+ wfWaitForSlaves();
printf( "%5.2f%%\n", $b / $numBlocks * 100 );
$start = intval( $maxID / $numBlocks ) * $b + 1;
diff --git a/maintenance/storage/trackBlobs.php b/maintenance/storage/trackBlobs.php
index 53377b9797e1..b5f800479a02 100644
--- a/maintenance/storage/trackBlobs.php
+++ b/maintenance/storage/trackBlobs.php
@@ -206,7 +206,7 @@ class TrackBlobs {
if ( $batchesDone >= $this->reportingInterval ) {
$batchesDone = 0;
echo "$startId / $endId\n";
- wfWaitForSlaves( 5 );
+ wfWaitForSlaves();
}
}
echo "Found $rowsInserted revisions\n";
@@ -290,7 +290,7 @@ class TrackBlobs {
if ( $batchesDone >= $this->reportingInterval ) {
$batchesDone = 0;
echo "$startId / $endId\n";
- wfWaitForSlaves( 5 );
+ wfWaitForSlaves();
}
}
echo "Found $rowsInserted orphan text rows\n";
diff --git a/maintenance/updateRestrictions.php b/maintenance/updateRestrictions.php
index c815f4b930e3..f1d613958d17 100644
--- a/maintenance/updateRestrictions.php
+++ b/maintenance/updateRestrictions.php
@@ -96,7 +96,7 @@ class UpdateRestrictions extends Maintenance {
}
$blockStart += $this->mBatchSize - 1;
$blockEnd += $this->mBatchSize - 1;
- wfWaitForSlaves( 5 );
+ wfWaitForSlaves();
}
$this->output( "...removing dead rows from page_restrictions\n" );
// Kill any broken rows from previous imports
diff --git a/maintenance/updateSpecialPages.php b/maintenance/updateSpecialPages.php
index 46d0fcc5a654..dff201c1b367 100644
--- a/maintenance/updateSpecialPages.php
+++ b/maintenance/updateSpecialPages.php
@@ -58,7 +58,7 @@ class UpdateSpecialPages extends Maintenance {
}
$this->output( sprintf( "completed in %.2fs\n", $seconds ) );
# Wait for the slave to catch up
- wfWaitForSlaves( 5 );
+ wfWaitForSlaves();
}
// This is needed to initialise $wgQueryPages
@@ -130,7 +130,7 @@ class UpdateSpecialPages extends Maintenance {
$dbw->commit();
}
# Wait for the slave to catch up
- wfWaitForSlaves( 5 );
+ wfWaitForSlaves();
} else {
$this->output( "cheap, skipped\n" );
}
diff --git a/maintenance/upgrade1_5.php b/maintenance/upgrade1_5.php
index 22fab7089632..709d0b26520c 100644
--- a/maintenance/upgrade1_5.php
+++ b/maintenance/upgrade1_5.php
@@ -101,7 +101,6 @@ class FiveUpgrade extends Maintenance {
$this->cleanupSwaps = array();
$this->emailAuth = false; # don't preauthenticate emails
- $this->maxLag = 10; # if slaves are lagged more than 10 secs, wait
$this->step = $this->getOption( 'step', null );
}
@@ -316,7 +315,7 @@ class FiveUpgrade extends Maintenance {
*/
function insertChunk( &$chunk ) {
// Give slaves a chance to catch up
- wfWaitForSlaves( $this->maxLag );
+ wfWaitForSlaves();
$this->dbw->insert( $this->chunkTable, $chunk, $this->chunkFunction, $this->chunkOptions );
}