Seb35 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/356619 )

Change subject: Use AtomicSectionUpdate instead of Database->onTransactionIdle
......................................................................

Use AtomicSectionUpdate instead of Database->onTransactionIdle

This is needed for deferred updates LinksDeletionUpdate and LinksUpdate, else
callbacks registered with onTransactionIdle prevent other transactions from
being executed, at least in this case.

Bug: T154425
Bug: T154438
Bug: T157679
Change-Id: Iecd396d584a62ac936cd963915339159467b44cd
---
M includes/jobqueue/JobQueueDB.php
1 file changed, 7 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/19/356619/1

diff --git a/includes/jobqueue/JobQueueDB.php b/includes/jobqueue/JobQueueDB.php
index 924aacc..3545ac0 100644
--- a/includes/jobqueue/JobQueueDB.php
+++ b/includes/jobqueue/JobQueueDB.php
@@ -185,15 +185,13 @@
         * @return void
         */
        protected function doBatchPush( array $jobs, $flags ) {
-               $dbw = $this->getMasterDB();
-
-               $method = __METHOD__;
-               $dbw->onTransactionIdle(
-                       function () use ( $dbw, $jobs, $flags, $method ) {
-                               $this->doBatchPushInternal( $dbw, $jobs, 
$flags, $method );
-                       },
-                       __METHOD__
-               );
+               DeferredUpdates::addUpdate( new AtomicSectionUpdate(
+                       wfGetDB( DB_MASTER ),
+                       __METHOD__,
+                       function ( IDatabase $dbw, $fname ) use ( $jobs, $flags 
) {
+                               $this->doBatchPushInternal( $dbw, $jobs, 
$flags, $fname );
+                       }
+               ) );
        }
 
        /**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iecd396d584a62ac936cd963915339159467b44cd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Seb35 <se...@seb35.fr>

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

Reply via email to