This is a re-submit of 35da1bbd7c, which was accidentally merged before
CR (and reverted with aa4da3c2e8).
The purge() method handles purging of both file cache and CDN, using
a PRESEND deferred update. This avoids code duplication and missing
file cache purge calls.
Also:
* Migrate HTMLCacheUpdate callers to just directly using HTMLCacheUpdateJob
* Add HtmlFileCacheUpdate class and defer such updates just like with CDN
* Simplify HTMLCacheUpdate constructor parameters
* Remove BacklinkCache::clear() calls which do nothing since the backlink
query does not actually happen until the job runs
Bug: T230025
Change-Id: Ic1005e70e2c22d5bd1ca36dcdb618108ebe290f3
My motivation to touch this code was a few count() I found confusing.
I ended rearranging it a lot to improve readability and clarity.
Change-Id: I9a0ea0812d4cc0c6e8ed6134e462dfdf325fd5d9
This is, in theory, a loophole that can not only cause such code to
consume suprising amounts of memory and runtime. It can also create
suprising results. For example, an input like
-param="might contain a = char"
might result in a cut-off value.
Not so much of a problem in a maintenance script. But still good
practice, I find.
Change-Id: I14fb278e6fdb61d0c486ca7e23229851ea479408
This is more consistent with LoadBalancer, modern, and inclusive
of master/master mysql, NDB cluster, and MariaDB galera cluster.
The old constant is an alias now.
Change-Id: I0b37299ecb439cc446ffbe8c341365d1eef45849
This was used in 2 special classes, the logger classes and spread
to a few other random classes.
Afaik this has no meaning. Is for something we don't use, and
goes against the meaning of '@section' in Doxygen, which we do
use.
In Doxygen output, all LICENSE references became links to
ProfilerXhprof (the one Doxygen encoutered first).
Bug: T72328
Change-Id: Icc7c443245c70bc0f549bee7d105eef5691c864d
UDP flooding is possible when purging large numbers of files. This
change adds a command line switch to the purgeChangedPages.php
maintenance script to insert an artificial delay between purge batches.
The intent is to allow the network time to process the batch that was
just sent before flooding with a second batch.
`--sleep-per-batch` can be used in combination with `--batch-size` to
manage network and to some extent query load. A suggested starting point
would be to use `--sleep-per-batch=500` in concert with the default
batch size of 100 to target a maximum rate of 200 packets/second.
Bug: 55632
Change-Id: Ibfc54b1767f145098465404a2b23cd92852e41fd
This maintenance script could be used to recover from large HTCP
listener outages and/or network partitions. It searches the database for
pages having revisions occurring within a specified time period,
converts them to full URLs and sends squid/varnish purge messages using
SquidUpdate. A command line option allows specifying a specific
IP:port combination for HTCP purge datagrams which can be used to
isolate the purge announcement to a particular varnish server or data
center.
Co-Authored by: Aaron Schulz <aschulz@wikimedia.org>
Bug: 54647
Change-Id: Id0e95290e83333545e6bb0378cc620c35c653bf9