Aaron Schulz has uploaded a new change for review.
https://gerrit.wikimedia.org/r/247297
Change subject: More SquidUpdate cleanups
......................................................................
More SquidUpdate cleanups
* Remove as 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
. If code does purge a thousand URLs at
once with not limiting (flooding UDP), then it is broken to
begin with.
* Make the HTCP method protected.
* Rename 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(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/97/247297/1
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: newchange
Gerrit-Change-Id: I17cced187fe7e93f5a5188022f12202a7746bdb7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits