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

Change subject: Avoid extra post-save parse that can sometimes occur
......................................................................


Avoid extra post-save parse that can sometimes occur

* Just avoid the purges in stableVersionUpdates() when they are
  already pointless, which also avoids this problem

Change-Id: I5c0ade287576358f389757ca4bde784a204e19ef
---
M backend/FlaggedRevs.class.php
1 file changed, 8 insertions(+), 3 deletions(-)

Approvals:
  Ori.livneh: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/backend/FlaggedRevs.class.php b/backend/FlaggedRevs.class.php
old mode 100644
new mode 100755
index ff4c010..927ac78
--- a/backend/FlaggedRevs.class.php
+++ b/backend/FlaggedRevs.class.php
@@ -569,6 +569,7 @@
         * @param FlaggedRevision|null $oldSv, the old stable version (optional)
         * @param Object editInfo Article edit info about the current revision 
(optional)
         * @return bool stable version text/file changed and FR_INCLUDES_STABLE
+        * @throws Exception
         */
        public static function stableVersionUpdates(
                $page, $sv = null, $oldSv = null, $editInfo = null
@@ -618,9 +619,13 @@
                }
                # Lazily rebuild dependancies on next parse (we invalidate 
below)
                FlaggedRevs::clearStableOnlyDeps( $title->getArticleID() );
-               # Clear page cache
-               $title->invalidateCache();
-               self::purgeSquid( $title );
+               # Clear page cache unless this is hooked via 
ArticleEditUpdates, in
+               # which case these updates will happen already with tuned 
timestamps
+               if ( !$editInfo ) {
+                       $title->invalidateCache();
+                       self::purgeSquid( $title );
+               }
+
                return $changed;
        }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5c0ade287576358f389757ca4bde784a204e19ef
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/FlaggedRevs
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <[email protected]>
Gerrit-Reviewer: Jackmcbarn <[email protected]>
Gerrit-Reviewer: Ori.livneh <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to