Include PRESEND updates in ChronologyProtector positions
authorAaron Schulz <aschulz@wikimedia.org>
Mon, 29 Aug 2016 00:01:55 +0000 (17:01 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Mon, 29 Aug 2016 00:01:55 +0000 (17:01 -0700)
This updates are PRESEND for reason, so users should see them
on the next page view. Otherwise, they would be POSTSEND.

Change-Id: I533de550f6dd3e4b75507c2d25b1a05f7ac1301d

includes/MediaWiki.php

index 2a00900..4c48f36 100644 (file)
@@ -571,13 +571,14 @@ class MediaWiki {
                        // Abort if any transaction was too big
                        [ 'maxWriteDuration' => $config->get( 'MaxUserDBWriteDuration' ) ]
                );
-               // Record ChronologyProtector positions
-               $factory->shutdown();
-               wfDebug( __METHOD__ . ': all transactions committed' );
 
                DeferredUpdates::doUpdates( 'enqueue', DeferredUpdates::PRESEND );
                wfDebug( __METHOD__ . ': pre-send deferred updates completed' );
 
+               // Record ChronologyProtector positions
+               $factory->shutdown();
+               wfDebug( __METHOD__ . ': all transactions committed' );
+
                // Set a cookie to tell all CDN edge nodes to "stick" the user to the DC that handles this
                // POST request (e.g. the "master" data center). Also have the user briefly bypass CDN so
                // ChronologyProtector works for cacheable URLs.