These special pages and their counter-part APIs are:
- Special:RecentChanges
- Special:Watchlist
- Special:Log
- Special:Contributions
This also changes the way MAX_EXECUTION_TIME works from taking the value
as milliseconds, it takes seconds which is more intuitive for users.
Bug: T297708
Depends-On: I126e7181422d8da1a63afc3717faa4f72a687dd9
Change-Id: I3ff78751c3df3b6342f1865d35c2075f4415185d
* Consolidate various duplicate docs to the main entry point.
Especially the duplication that followed after ExternalStoreFactory
and ExternalStoreAccess were introduced with ExternalStore
left as deprecated wrapper.
* Officially mark ExternalStoreFactory as internal, pointing
to ExternalStoreAccess instead. And document why the latter exists,
since it seems all its methods could trivially move to the factory
class. Follows-up I40c3b553, where it was explained that the factory
is meant to be an internal implementation detail, with the access
class meant to resemble ExternalStoreMedium.
* Use consistent terms for "protocol", "location" and "object"
(reduce use of words like medium, backend, type, blob, revision,
etc. within this code).
* Document that ExternalStore is fundamentally designed as an
append-only store (per T247383).
Bug: T247383
Change-Id: I1094af7d35a14f9e47b8791f3e4cc888e8cbfc7f
This will modify the SQL to add a timeout specifier, depending
on whether the server is running MySQL or MariaDB, and whether
such features are supported for the version number.
Bug: T129093
Bug: T195792
Change-Id: I12e095fe82622064e555a42f1812eb99d201f10c
This to maintain forward-compat and consistency for the newer PDO
version in PHP 8, which changes the default from ERRMODE_SILENT to
ERRMODE_EXCEPTION.
https://www.php.net/manual/en/pdo.error-handling.php
Change-Id: Ieb6bbcbe884fcb8861e38c10b745d8a7502db7db
They are not used in anything deployed to production
These methods are:
- ::getTopologyRootMaster() since 1.37
- ::masterPosWait() since 1.37
- ::dataSeek() soft-deprecated since 1.37
- ::onTransactionIdle() soft-deprecated since 1.32
- ::getMasterPos() since 1.37
Bug: T296960
Change-Id: I1d196172b3f50e1200980c6325beccecac7db903
Right now, the check is on whether topologyRole is truthy and it's
always trruthy making logger to prefix every query with "query-m".
Follows-up I437ce43432660 (fb621c26a3).
Change-Id: I691ac772010b914b3f13b6b9897764b829a2c632
Generalize makeWhere2d() to provide factorConds(), which simplifies any
boolean expression consisting of equality conditions in a
sum-of-products form.
Change-Id: Ic2d6b054b69fd0be0577807bcc4afb919af7d693
Use ERR_UNREACHABLE and ERR_NO_RESPONSE in various error cases,
rather than just using ERR_UNEXPECTED.
Bug: T252951
Change-Id: I5c15362132b8c80aad973520e0addc474bb38c22
These are useful when debugging requests that vary behavior based on
the headers specified, like Swift's x-copy-from. Additionally,
knowing the content-length is helpful when looking at how long
the request took.
We do know that some headers are likely to contain sensitive
passwords/tokens, so try to redact those ahead of time using a regex of:
(authorization|auth|password|cookie)
This will catch the standard Authorization header, plus Swift's
X-Auth-Token and X-Auth-Key. The regex is a best effort, but not
intended to be fully comprehensive as there's already plenty of
private data being included in logs.
Change-Id: I6e695f357f92ce8d40b54ea39002fb7858f5596e
DB hostnames are extremely useful in getting the info when they are on
different MariaDB versions for example or their table stats need
refreshing.
Time fields are not being counted as numbers in Logstash because these
values are conflicting with other values that are string. Let's fix it.
Bug: T295706
Change-Id: Iff1c1087a7b64a51b5cbd7ecf13afc87d452c352
Don't just cut off the message key at 25 characters, it makes
debugging very annoying. But do cut off the parameter at some
reasonable length, it could be arbitrarily large.
Change-Id: I8a2665434d6370477eb36a6827eb634e230d280a
The default not configured value for $wgLocalHTTPProxy is false, not
null. So in MultiHttpClient make sure it defaults to false and check for
false when deciding whether to use the proxy.
MWHttpRequest already has the correct behavior.
Bug: T296312
Change-Id: I3962c24f9cb159fb7d1e194e59c8bef5261371c3
- Remove TrxId from GeneralizedSql. It's actually making the whole
"generalized" part of sql useless and takes away the ability to
aggregate based on normalized value.
- Add TrxId as part of violation message.
Bug: T295706
Change-Id: I3d0d99b5eef312d3ba5f8aecae2f4bfd027fa34a
As the comment explains it would break aggregation of similar queries
in analysis tools.
Bug: T193050
Change-Id: I6e9939e34287d274302f984327685de81a19cdec
- Use DeletePage in FileDeleteForm instead of
WikiPage::doDeleteArticleReal
- Properly handle scheduled deletions in FileDeleteForm: previously, a
null status value could indicate a missing page OR a scheduled
deletion, but the code always assumed the first, and it would generate
a duplicated log entry. The API response would also not contain the
"delete-scheduled" message. This has been broken since the introduction
of scheduled deletion.
- In ApiDelete, for file deletions, check whether the status is OK not
good. The two might be equivalent, but this way it's more consistent.
- Add some documentation for the Status objects returned by file-related
methods. This is still incomplete, as there are many methods using
Status and none of them says what the status could be. In particular,
this means that for now we keep checking whether the status is OK
instead of good, even though it's unclear what could produce a
non-fatal error.
- In LocalFileDeleteBatch, avoid using a class property for the returned
status, as that's hard to follow. Instead, use a local variable and
pass it around when needed.
Bug: T288758
Change-Id: I22d60c05bdd4a3ea531e63dbb9e49efc36935137
This follows the same approach as MWHttpRequest, we inject
$wgLocalVirtualHosts, and for each request check whether it matches that
domain list, rewriting the request as necessary.
Unfortunately this requires a decent amount of code duplication because
MultiHttpClient is in includes/libs/ and can't depend on the same code
in MWHttpRequest.
Bug: T288848
Change-Id: Ia16d8f86b1cb20dde9fe487729d67d92af650cfe
* Added ParamType::OBJECT, which allows Stringable objects to be passed into MessageValue
Bug: T278482
Change-Id: Ib4990f87d4ad70b7525d7aa05c8b97e90c121674
LocalFile::lock() held an explicit DB transaction open while a
potentially slow file backend operation was in progress, causing
production errors.
Instead, protect write operations with non-blocking locks. If a file is
locked, report the failure to the user. Like an edit conflict, informing
the user is appropriate in most cases. For example, if two admins try to
delete the same file at the same time, only one should succeed, and the
second does not need to wait for the first.
In upgradeRow(), locks were used to protect operations which read from a
file and write the result back to the database. The lock was supposed
to prevent overwriting of fresh data with stale data. Use a timestamp
check instead.
Bug: T283045
Change-Id: Iaf9c9eef617044656b5b0d91a9632eacd84a5a78