From 62053ac8fda5b00457bb3ad1891eac2316cf707d Mon Sep 17 00:00:00 2001 From: Platonides Date: Wed, 20 Apr 2011 00:12:06 +0000 Subject: [PATCH] Merge r86398 into the old wfWaitForSlaves. Update core calls. maintenance/waitForSlave.php still calls the old prototype. Most instances were replaced with sed -i 's/wfWaitForSlaves( [0-9]* );/wfWaitForSlaves();/' ./maintenance/initEditCount.php ./maintenance/updateRestrictions.php ./maintenance/updateSpecialPages.php ./maintenance/importDump.php ./maintenance/moveBatch.php ./maintenance/storage/resolveStubs.php ./maintenance/storage/trackBlobs.php ./maintenance/storage/fixBug20757.php ./maintenance/storage/moveToExternal.php ./maintenance/storage/compressOld.inc ./maintenance/populateSha1.php ./maintenance/deleteDefaultMessages.php ./maintenance/migrateUserGroup.php ./maintenance/importImages.php ./maintenance/runJobs.php ./maintenance/archives/upgradeLogging.php ./maintenance/deleteBatch.php ./maintenance/populateLogSearch.php ./maintenance/populateLogUsertext.php ./maintenance/gearman/gearmanWorker.php ./maintenance/populateRevisionLength.php ./maintenance/refreshLinks.php ./maintenance/deleteSelfExternals.php ./maintenance/upgrade1_5.php ./maintenance/rebuildFileCache.php ./includes/job/RefreshLinksJob.php ./includes/installer/MysqlUpdater.php ./maintenance/convertUserOptions.php ./maintenance/populateParentId.php ./maintenance/runBatchedQuery.php ./maintenance/upgrade1_5.php ./maintenance/waitForSlave.php ./maintenance/populateCategory.php ./maintenance/importImages.php --- includes/GlobalFunctions.php | 38 ++++--------------------- includes/installer/MysqlUpdater.php | 2 +- includes/job/RefreshLinksJob.php | 2 +- maintenance/archives/upgradeLogging.php | 2 +- maintenance/convertUserOptions.php | 2 +- maintenance/deleteBatch.php | 2 +- maintenance/deleteDefaultMessages.php | 2 +- maintenance/deleteSelfExternals.php | 2 +- maintenance/gearman/gearmanWorker.php | 2 +- maintenance/importDump.php | 2 +- maintenance/importImages.php | 4 +-- maintenance/initEditCount.php | 2 +- maintenance/migrateUserGroup.php | 2 +- maintenance/moveBatch.php | 2 +- maintenance/populateCategory.php | 2 +- maintenance/populateLogSearch.php | 2 +- maintenance/populateLogUsertext.php | 2 +- maintenance/populateParentId.php | 2 +- maintenance/populateRevisionLength.php | 2 +- maintenance/populateSha1.php | 2 +- maintenance/rebuildFileCache.php | 2 +- maintenance/refreshLinks.php | 12 ++++---- maintenance/runBatchedQuery.php | 2 +- maintenance/runJobs.php | 2 +- maintenance/storage/compressOld.inc | 4 +-- maintenance/storage/fixBug20757.php | 2 +- maintenance/storage/moveToExternal.php | 2 +- maintenance/storage/resolveStubs.php | 2 +- maintenance/storage/trackBlobs.php | 4 +-- maintenance/updateRestrictions.php | 2 +- maintenance/updateSpecialPages.php | 4 +-- maintenance/upgrade1_5.php | 3 +- 32 files changed, 46 insertions(+), 73 deletions(-) diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index a41625829d..15cfb7a94a 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -3146,43 +3146,17 @@ function wfWarn( $msg, $callerOffset = 1, $level = E_USER_NOTICE ) { } /** - * Sleep until the worst slave's replication lag is less than or equal to - * $maxLag, in seconds. Use this when updating very large numbers of rows, as + * Modern version of wfWaitForSlaves(). Instead of looking at replication lag + * and waiting for it to go down, this waits for the slaves to catch up to the + * master position. Use this when updating very large numbers of rows, as * in maintenance scripts, to avoid causing too much lag. Of course, this is * a no-op if there are no slaves. - * - * Every time the function has to wait for a slave, it will print a message to - * that effect (and then sleep for a little while), so it's probably not best - * to use this outside maintenance scripts in its present form. - * - * @param $maxLag Integer + * + * @param $maxLag Integer (deprecated) * @param $wiki mixed Wiki identifier accepted by wfGetLB * @return null */ -function wfWaitForSlaves( $maxLag, $wiki = false ) { - if( $maxLag ) { - $lb = wfGetLB( $wiki ); - list( $host, $lag ) = $lb->getMaxLag( $wiki ); - while( $lag > $maxLag ) { - wfSuppressWarnings(); - $name = gethostbyaddr( $host ); - wfRestoreWarnings(); - if( $name !== false ) { - $host = $name; - } - print "Waiting for $host (lagged $lag seconds)...\n"; - sleep( $maxLag ); - list( $host, $lag ) = $lb->getMaxLag(); - } - } -} - -/** - * Modern version of wfWaitForSlaves(). Instead of looking at replication lag - * and waiting for it to go down, this waits for the slaves to catch up to the - * master position. This is much better for lag control than wfWaitForSlaves() - */ -function wfWaitForSlaves_masterPos() { +function wfWaitForSlaves( $maxLag = false, $wiki = false ) { $lb = wfGetLB(); // bug 27975 - Don't try to wait for slaves if there are none // Prevents permission error when getting master position diff --git a/includes/installer/MysqlUpdater.php b/includes/installer/MysqlUpdater.php index fc411941f0..f9f212d32c 100644 --- a/includes/installer/MysqlUpdater.php +++ b/includes/installer/MysqlUpdater.php @@ -652,7 +652,7 @@ class MysqlUpdater extends DatabaseUpdater { foreach ( $res as $row ) { $count = ( $count + 1 ) % 100; if ( $count == 0 ) { - wfWaitForSlaves( 10 ); + wfWaitForSlaves(); } $this->db->insert( 'templatelinks', array( diff --git a/includes/job/RefreshLinksJob.php b/includes/job/RefreshLinksJob.php index cc91fa81aa..910f0c5810 100644 --- a/includes/job/RefreshLinksJob.php +++ b/includes/job/RefreshLinksJob.php @@ -119,7 +119,7 @@ class RefreshLinksJob2 extends Job { $update = new LinksUpdate( $title, $parserOutput, false ); $update->doUpdate(); wfProfileOut( __METHOD__.'-update' ); - wfWaitForSlaves( 5 ); + wfWaitForSlaves(); } wfProfileOut( __METHOD__ ); diff --git a/maintenance/archives/upgradeLogging.php b/maintenance/archives/upgradeLogging.php index d920639577..1765bd9f10 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 278d40ff30..f46f710d8c 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 c8bb4803c3..f5f850a769 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 fc482ac007..e518509051 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 db23e92c88..4e9f54f2c7 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 aea126a717..3ea100818c 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 71cfbc0603..5397959e74 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 cc713db0ce..47dc3cc064 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 e421e29bf8..0f136450fe 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 c41632086f..771ed947e9 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 c749533841..9b9f910519 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 ce0765c9aa..13b77fa862 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 ce2d95ccf1..894c9ee115 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 bb3927ce4f..af912ad2ea 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 387f5a5603..7cbc267bbc 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 0af51dc113..7ed306e84f 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 1714c0d64c..165a6cfe53 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 5028cbe0a4..4bf64621c2 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 420f5553a4..8fe4d3ca85 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 */ 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 e641db8c2e..8d1b53eb95 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 69c006b542..0edf7ac934 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 187e976926..02e85cbd57 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 d04a24ffd1..b6def2dab9 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 5ce225c4ff..64f3adaa66 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 fad4590a07..08d0ee04f6 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 53377b9797..b5f800479a 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 c815f4b930..f1d613958d 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 46d0fcc5a6..dff201c1b3 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 22fab70896..709d0b2652 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 ); } -- 2.20.1