jenkins-bot has submitted this change and it was merged. Change subject: More SquidUpdate cleanups ......................................................................
More SquidUpdate cleanups * Remove $wgMaxSquidPurgeTitles; silently discarding URLs is the wrong way to limit things. The purge methods already batch, which HTCP pushing one at a time. Jobs already batch and have $wgJobBackoffThrottling. If code does purge 500 URLs at once with no limiting (flooding UDP), then it is already broken. * Make the HTCP method protected. * Rename $urlArr field. Change-Id: I17cced187fe7e93f5a5188022f12202a7746bdb7 --- M RELEASE-NOTES-1.27 M includes/DefaultSettings.php M includes/deferred/SquidUpdate.php 3 files changed, 6 insertions(+), 20 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/RELEASE-NOTES-1.27 b/RELEASE-NOTES-1.27 index 835d38a..2c64b2d 100644 --- a/RELEASE-NOTES-1.27 +++ b/RELEASE-NOTES-1.27 @@ -43,6 +43,7 @@ PasswordFactory themselves. ** A new constructor, User::newSystemUser(), has been added to simplify the creation of passwordless "system" users for logged actions. +* $wgMaxSquidPurgeTitles was removed. === New features in 1.27 === * $wgDataCenterId and $wgDataCenterRoles where added, which will serve as diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index c21301f..7b196cb 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -2620,11 +2620,6 @@ $wgSquidServersNoPurge = array(); /** - * Maximum number of titles to purge in any one client operation - */ -$wgMaxSquidPurgeTitles = 400; - -/** * Whether to use a Host header in purge requests sent to the proxy servers * configured in $wgSquidServers. Set this to false to support Squid * configured in forward-proxy mode. diff --git a/includes/deferred/SquidUpdate.php b/includes/deferred/SquidUpdate.php index 8d535b1..5f1552d 100644 --- a/includes/deferred/SquidUpdate.php +++ b/includes/deferred/SquidUpdate.php @@ -26,25 +26,15 @@ * @ingroup Cache */ class SquidUpdate implements DeferrableUpdate { - /** - * Collection of URLs to purge. - * @var array - */ - protected $urlArr; + /** @var string[] Collection of URLs to purge */ + protected $urls = array(); /** * @param array $urlArr Collection of URLs to purge */ public function __construct( array $urlArr ) { - global $wgMaxSquidPurgeTitles; - // Remove duplicate URLs from list - $urlArr = array_unique( $urlArr ); - if ( count( $urlArr ) > $wgMaxSquidPurgeTitles ) { - // Truncate to desired maximum URL count - $urlArr = array_slice( $urlArr, 0, $wgMaxSquidPurgeTitles ); - } - $this->urlArr = $urlArr; + $this->urls = array_unique( $urlArr ); } /** @@ -77,7 +67,7 @@ * Purges the list of URLs passed to the constructor. */ public function doUpdate() { - self::purge( $this->urlArr ); + self::purge( $this->urls ); } /** @@ -136,7 +126,7 @@ * @throws MWException * @param array $urlArr Collection of URLs to purge */ - public static function HTCPPurge( $urlArr ) { + protected static function HTCPPurge( $urlArr ) { global $wgHTCPRouting, $wgHTCPMulticastTTL; // HTCP CLR operation -- To view, visit https://gerrit.wikimedia.org/r/247297 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I17cced187fe7e93f5a5188022f12202a7746bdb7 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz <asch...@wikimedia.org> Gerrit-Reviewer: Krinkle <krinklem...@gmail.com> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits