Merge "Include PRESEND updates in ChronologyProtector positions"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Tue, 30 Aug 2016 01:31:47 +0000 (01:31 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 30 Aug 2016 01:31:47 +0000 (01:31 +0000)
1  2 
includes/MediaWiki.php

diff --combined includes/MediaWiki.php
@@@ -286,6 -286,16 +286,6 @@@ class MediaWiki 
                                // may still be a wikipage redirect to another article or URL.
                                $article = $this->initializeArticle();
                                if ( is_object( $article ) ) {
 -                                      $url = $request->getFullRequestURL(); // requested URL
 -                                      if (
 -                                              $request->getMethod() === 'GET' &&
 -                                              $url === $article->getTitle()->getCanonicalURL() &&
 -                                              $article->checkTouched() &&
 -                                              $output->checkLastModified( $article->getTouched() )
 -                                      ) {
 -                                              wfDebug( __METHOD__ . ": done 304\n" );
 -                                              return;
 -                                      }
                                        $this->performAction( $article, $requestTitle );
                                } elseif ( is_string( $article ) ) {
                                        $output->redirect( $article );
                        // 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.