EBernhardson has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/325811

Change subject: Wrap waitForReplication in try/catch
......................................................................

Wrap waitForReplication in try/catch

Very few of these jobs seem to be finishing, due to some
replicas being so far behind we get DBReplicationWaitError
thrown, which causes the job to be restarted. Catch and log,
but don't stop processing because of it.

There is also a problem with jobs that blow out the memory limits,
but not sure what to do with that.

Change-Id: Idffcfad76936f5e62e9018c58f2cb57db35af4b8
---
M includes/Job/InitImageDataJob.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PageImages 
refs/changes/11/325811/1

diff --git a/includes/Job/InitImageDataJob.php 
b/includes/Job/InitImageDataJob.php
index 3debeae..a6ec772 100644
--- a/includes/Job/InitImageDataJob.php
+++ b/includes/Job/InitImageDataJob.php
@@ -19,12 +19,12 @@
                foreach ( $this->params['page_ids'] as $id ) {
                        try {
                                RefreshLinks::fixLinksFromArticle( $id );
+                               $lbFactory->waitForReplication();
                        } catch (\Exception $e) {
                                // There are some broken pages out there that 
just don't parse.
                                // Log it and keep on trucking.
                                MWExceptionHandler::logException( $e );
                        }
-                       $lbFactory->waitForReplication();
                }
        }
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/325811
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idffcfad76936f5e62e9018c58f2cb57db35af4b8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PageImages
Gerrit-Branch: wmf/1.29.0-wmf.4
Gerrit-Owner: EBernhardson <ebernhard...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to