Hoo man has uploaded a new change for review.
https://gerrit.wikimedia.org/r/192243
Change subject: Wait for slaves in RecentChangesUpdateJob
......................................................................
Wait for slaves in RecentChangesUpdateJob
Change-Id: Iba8dca2f92d1c9ba2e5ab064aae828e4d88779bb
---
M includes/jobqueue/jobs/RecentChangesUpdateJob.php
1 file changed, 9 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/43/192243/1
diff --git a/includes/jobqueue/jobs/RecentChangesUpdateJob.php
b/includes/jobqueue/jobs/RecentChangesUpdateJob.php
index b54ecfd..c5f3bdb 100644
--- a/includes/jobqueue/jobs/RecentChangesUpdateJob.php
+++ b/includes/jobqueue/jobs/RecentChangesUpdateJob.php
@@ -78,6 +78,15 @@
}
// No need for this to be in a transaction.
$dbw->commit( __METHOD__, 'flush' );
+
+ if ( count( $rcIds ) === 100 ) {
+ // There might be more, so try waiting for
slaves
+ $goOn = wfWaitForSlaves( null, false, false, /*
$timeout = */ 3 );
+ if ( !$goOn ) {
+ // Another job will continue anyway
+ break;
+ }
+ }
} while ( $rcIds );
$dbw->unlock( $lockKey, __METHOD__ );
--
To view, visit https://gerrit.wikimedia.org/r/192243
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iba8dca2f92d1c9ba2e5ab064aae828e4d88779bb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Hoo man <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits