jenkins-bot has submitted this change and it was merged.

Change subject: Make flushDeferredQueue() not try to commit the transaction 
round
......................................................................


Make flushDeferredQueue() not try to commit the transaction round

It will flush the jobs to the main PRESEND queue instead.
Trying to run deferred updates here causes DBTransactionError
in LBFactory::beginMasterChanges().

Maintenance scripts already try to run jobs in various points,
so is not likely to be a build up problem (it even queues some
updates as Jobs if the buffer is too big). Nevertheless, call
DeferredUpdates::tryOpportunisticExecute() after adding the
jobs to main queue, in case they *can* safely be run.

Bug: T144618
Change-Id: Id1bf70c586fd06d4fda94721e60fed982441bee5
---
M includes/Import/Importer.php
1 file changed, 5 insertions(+), 2 deletions(-)

Approvals:
  Sbisson: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/Import/Importer.php b/includes/Import/Importer.php
index 1cff2fa..f320ac6 100644
--- a/includes/Import/Importer.php
+++ b/includes/Import/Importer.php
@@ -430,9 +430,12 @@
 
        protected function flushDeferredQueue() {
                while ( !$this->deferredQueue->isEmpty() ) {
-                       DeferredUpdates::addCallableUpdate( 
$this->deferredQueue->dequeue() );
+                       DeferredUpdates::addCallableUpdate(
+                               $this->deferredQueue->dequeue(),
+                               DeferredUpdates::PRESEND
+                       );
+                       DeferredUpdates::tryOpportunisticExecute();
                }
-               DeferredUpdates::doUpdates();
        }
 
        protected function clearDeferredQueue() {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id1bf70c586fd06d4fda94721e60fed982441bee5
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <asch...@wikimedia.org>
Gerrit-Reviewer: Sbisson <sbis...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to