Seb35 has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/356120 )
Change subject: More properly close MediaWiki jobs ...................................................................... More properly close MediaWiki jobs In the postprocessing, some jobs can be executed but given the deferred updates are already "closed", any new DeferredUpdate is directly called (as explained by Krinkle on T165714), and some transactions opened by classical jobs are badly mixed with transactions (directly) executed by DeferredUpdates jobs, issueing a DBError, avoiding the job, which stays in a 'claimed' status even if failed. This change inhibits the run-immediately-deferred-updates behaviour even in the postprocessing, instead a second call to doUpdates is done after classical jobs (executed at the end of the Web request), so that if the classical jobs add DeferredUpdates they are executed. It remains in my error log an error about transactions during the first call of doUpdates; I guess it is another issue. Bug: T165714 Change-Id: I721e7167eca5b0b6227234fe516005243ab22388 --- M includes/MediaWiki.php M includes/deferred/DeferredUpdates.php 2 files changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/20/356120/1 diff --git a/includes/MediaWiki.php b/includes/MediaWiki.php index b18414d..6dd2322 100644 --- a/includes/MediaWiki.php +++ b/includes/MediaWiki.php @@ -911,6 +911,9 @@ $this->triggerJobs(); } + // Rerun deferred jobs if normal jobs added some + DeferredUpdates::doUpdates( 'enqueue' ); + // Log profiling data, e.g. in the database or UDP wfLogProfilingData(); diff --git a/includes/deferred/DeferredUpdates.php b/includes/deferred/DeferredUpdates.php index bbe8687..a328a43 100644 --- a/includes/deferred/DeferredUpdates.php +++ b/includes/deferred/DeferredUpdates.php @@ -91,8 +91,6 @@ } if ( self::$immediateMode ) { - // No more explicit doUpdates() calls will happen, so run this now - self::doUpdates( 'run' ); return; } -- To view, visit https://gerrit.wikimedia.org/r/356120 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I721e7167eca5b0b6227234fe516005243ab22388 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