Aaron Schulz has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/373705 )

Change subject: Disable rebound CDN purges for backlinks in HTMLCacheUpdateJob
......................................................................

Disable rebound CDN purges for backlinks in HTMLCacheUpdateJob

These are there to handle regeneration race conditions due to
replication lag. If there happens to already be a huge amount
of purges, the cost of this can be too high. Also, if the queue
is backlogged, then it is already delayed, so extra delayed jobs
do not help and just add to the backlog in that scenario.

Bug: T173710
Change-Id: Ida0bf44233072e1356a9fe63866d522e4bb2d0ca
---
M includes/jobqueue/jobs/HTMLCacheUpdateJob.php
1 file changed, 7 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/05/373705/1

diff --git a/includes/jobqueue/jobs/HTMLCacheUpdateJob.php 
b/includes/jobqueue/jobs/HTMLCacheUpdateJob.php
index 07d68e7..9d0f87c 100644
--- a/includes/jobqueue/jobs/HTMLCacheUpdateJob.php
+++ b/includes/jobqueue/jobs/HTMLCacheUpdateJob.php
@@ -139,9 +139,13 @@
                        __METHOD__
                ) );
 
-               // Update CDN
-               $u = CdnCacheUpdate::newFromTitles( $titleArray );
-               $u->doUpdate();
+               // Update CDN; call purge() directly so as to not bother with 
secondary purges
+               $urls = [];
+               foreach ( $titleArray as $title ) {
+                       /** @var Title $title */
+                       $urls = array_merge( $urls, $title->getCdnUrls() );
+               }
+               CdnCacheUpdate::purge( $urls );
 
                // Update file cache
                if ( $wgUseFileCache ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ida0bf44233072e1356a9fe63866d522e4bb2d0ca
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <asch...@wikimedia.org>

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

Reply via email to