Commit graph

113224 commits

Author SHA1 Message Date
Amir Sarabadani
4ba40f2d2b CommentStore: Use SelectQueryBuilder
Cleaner

Bug: T311866
Change-Id: If3df302b63d7329bdffebf7f93385b249396ebec
2022-11-21 18:53:32 +01:00
Amir Sarabadani
75351035d8 Category: Use SelectQueryBuilder
And some more clean ups, like using buildComparison, avoiding
traditional join (using WHERE condition), etc.

Bug: T311866
Change-Id: I11e168101bba92afa4122984b37aac5ac247dd8b
2022-11-21 18:53:31 +01:00
Translation updater bot
4a4efed2b5 Localisation updates from https://translatewiki.net.
Change-Id: I2e235a8604741666f1639738f11e2e986ab36098
2022-11-18 08:14:26 +01:00
jenkins-bot
7e6789b58a Merge "search: Don't calculate thumbnail sizes in SearchResultThumbnailProvider" 2022-11-17 23:16:32 +00:00
jenkins-bot
4bf7316830 Merge "Add section metadata parsercache serialization tests for MW 1.40" 2022-11-17 22:50:54 +00:00
jenkins-bot
30450c9a0c Merge "MediaWiki: Temp silence FR-induced clearActionName warnings" 2022-11-17 22:15:47 +00:00
Subramanya Sastry
fb747bc038 Add section metadata parsercache serialization tests for MW 1.40
* Generate data files for 1.40 only since the new formats only
  showed up in 1.40 and won't be present in the parser cache
  for older MW versions.

Change-Id: I6f297e3091ec2faab7c2203c138800551b01e32a
2022-11-17 15:48:15 -06:00
Timo Tijhof
707da6974c MediaWiki: Temp silence FR-induced clearActionName warnings
There's a few remaining for the following conditions are met:
1. The wiki has FlaggedRevs installed.
2. The URL is to a wikipage redirect.
3. The destination page uses FR and has unreviewed changes pending.

In this case, FlaggedRevs uses onInitializeArticleMaybeRedirect
and calls RequestContext::getActionName which is then invalidated
due to changing the Title/WikiPage/ContentHandler from which actions
are determined.

This will be fixed in FlaggedRevs soon, but for now silence it while
we take that on carefully.

Bug: T323254
Change-Id: If86476da7bc76be49bad0780dc63d2255080aaa2
2022-11-17 21:07:53 +00:00
jenkins-bot
b1c3f36a40 Merge "objectcache: avoid serialize() in WANObjectCache::checkAndSetCooloff()" 2022-11-17 20:47:50 +00:00
Aaron Schulz
336ec2a3d1 objectcache: avoid serialize() in WANObjectCache::checkAndSetCooloff()
Use a generic hypothetical size for more complex objects, relying more
so on the value of $elapsed. The time elapsed from miss till set
attempt, and, the key query rate, are the biggest determinants of
duplicate key set spikes.

Use 2 second TTLs for cool-off/interim keys given the +/- 1 second
precision of key expiration within memcached. 1 second TTL keys can
sometimes count as expired 1ms after the key set.

Bug: T321634
Change-Id: Ic60d3ba3b16cd60a49c467ac3e19ecf95c1f27c0
2022-11-17 20:32:23 +00:00
jenkins-bot
079cddac7a Merge "Settings: Introduce SettingsBuilder::getInstance to avoid $wgSettings" 2022-11-17 20:22:12 +00:00
jenkins-bot
8a862cc9c2 Merge "rdbms: remove lock timeouts from Database::isKnownStatementRollbackError" 2022-11-17 20:14:52 +00:00
Matthias Mullie
dea8ea22aa search: Don't calculate thumbnail sizes in SearchResultThumbnailProvider
Not only is this intensive to compute (and could be an attack vector),
it's also quite pointless as it's derived from thumbnails, which in
turn are derived concepts for which the implementation may change.

AFAICT, none of the consumers of this API even use this data (so it's
inclusion is negatively affecting them by slowing response times down)
It's also not consistently available: for most of the thumbnails, this
data is usually null.

Bug: T323125
Depends-On: I20d5c4358e225be7759ed38afb2267d6f811fa34
Change-Id: I65435ded5e8bea57f3e23e7e790ac007821bbd67
2022-11-17 20:11:12 +00:00
jenkins-bot
965bf4d627 Merge "Tell Windows users not to add user and group ID to .env" 2022-11-17 20:10:26 +00:00
daniel
f517783c5f Settings: Introduce SettingsBuilder::getInstance to avoid $wgSettings
While accessing a SettingsBuilder instance via global state should not
be encouraged, we still need it sometimes. So use a static getter
instead of a global variable. That way, we can emit deprecation warnings
when we have proper alternatives available.

Change-Id: I0013bdab474710fd521532dd2653b3789e2ede34
2022-11-17 20:06:39 +00:00
jenkins-bot
9f5bdaba10 Merge "Message::rawParam: Remove unused 'raw_param' annotation" 2022-11-17 19:47:59 +00:00
jenkins-bot
27958a67b7 Merge "Metrics: add metric property accessors" 2022-11-17 19:20:11 +00:00
jenkins-bot
2562d05fa1 Merge "Metrics: move metric implementations to subdirectory" 2022-11-17 19:19:44 +00:00
jenkins-bot
e5ad12f3bc Merge "Metrics: expand Sample instance parameters" 2022-11-17 19:19:17 +00:00
jenkins-bot
47c08b164c Merge "Metrics: rename extension to component" 2022-11-17 19:11:07 +00:00
sbassett
37cf176abd Message::rawParam: Remove unused 'raw_param' annotation
Bug: T323104
Change-Id: Id3bfe52b8b55ac304b6b85e14951c3dbd16aa7da
2022-11-17 13:55:57 -05:00
Gergő Tisza
07b2716f8a
InitializeArticleMaybeRedirect hook: Improve docs & restrict
The hook was underspecified, $article was passed by reference
but it doesn't make any sense to change it and none of the existing
implementations do, so clarify in the docs that it shouldn't be
done and drop related logic. Also improve documentation in
general.

Bug: T323184
Bug: T323254
Change-Id: I53dfc7e29adcd21bb8b3ca7a1df6d88819099f3c
2022-11-17 09:56:01 -08:00
jenkins-bot
95c348607a Merge "Remove deprecated getMasterDB methods" 2022-11-17 17:14:18 +00:00
jenkins-bot
7f918d60d7 Merge "DevelopmentSettings: Enable Vue development mode" 2022-11-17 17:12:53 +00:00
jenkins-bot
9b04a76629 Merge "ResourceLoader: Clean up PHP 7.2 hacks" 2022-11-17 16:21:44 +00:00
jenkins-bot
afecdf769f Merge "objectcache: suppress TransactionProfiler in occasionallyGarbageCollect()" 2022-11-17 16:12:28 +00:00
jenkins-bot
530c08f39c Merge "Various doc fixes about false on method arguments/return types" 2022-11-17 14:53:24 +00:00
jenkins-bot
06ec8df58c Merge "rdbms: clarify deleteJoin() slightly" 2022-11-17 14:47:30 +00:00
jenkins-bot
1f39f2892c Merge "Really drop DifferenceEngine::getDiffBodyCacheKey" 2022-11-17 14:09:34 +00:00
Matěj Suchánek
a90a065586 Remove deprecated getMasterDB methods
They have been deprecated since 1.37 and are unused.

Change-Id: I626525eead68e3ba50564ac629a86c7c8dc9dd73
2022-11-17 14:30:47 +01:00
jenkins-bot
c29ba89591 Merge "Add autoReconfigure() to ILBFactory" 2022-11-17 13:22:42 +00:00
jenkins-bot
40a93b3367 Merge "mobile preferences: optimize toggle switches" 2022-11-17 12:52:56 +00:00
jenkins-bot
381c1f0822 Merge "Track reason for rendering in more detail." 2022-11-17 12:44:01 +00:00
Matěj Suchánek
755e86c8fb Really drop DifferenceEngine::getDiffBodyCacheKey
In 81f69c2, I have only removed the callers. The method is
now dead code and should have been removed as well.

Change-Id: I556ed5398435f4d3a5f400e07e4819dd16e0df06
2022-11-17 12:24:09 +00:00
Kosta Harlan
13c53dd43b DevelopmentSettings: Enable Vue development mode
Change-Id: Id68a44273c6eb546873e4408e56aaa5569a2dade
2022-11-17 12:00:23 +00:00
Tim Starling
f94dfb6e0b ResourceLoader: Clean up PHP 7.2 hacks
Remove workarounds for the lack of proper autoloading for aliased
parameter type declarations which was fixed in PHP 7.4.

Change-Id: Ic4485d06e7ad8d02859dc3e5c67867c4b084386f
2022-11-17 09:51:33 +00:00
jenkins-bot
2448e3acbd Merge "objectcache: use multi-row upsert support in SqlBagOStuff" 2022-11-17 08:32:36 +00:00
jenkins-bot
f7df154a1e Merge "rdbms: make doUpsert() handle SET clauses with TIMESTAMPTZ" 2022-11-17 08:32:29 +00:00
jenkins-bot
380aef9d96 Merge "rdbms: improve TransactionProfiler::silenceForScope()" 2022-11-17 07:53:29 +00:00
Aaron Schulz
9c7ddf1f0a objectcache: use multi-row upsert support in SqlBagOStuff
This cuts down on needless roundtrips and lock contention

Change-Id: Ic9681512a4b17f000da21b45cacad173e644a44e
2022-11-17 07:49:01 +00:00
Aaron Schulz
8566ecbcfb rdbms: make doUpsert() handle SET clauses with TIMESTAMPTZ
For postgres, work around the lack of implicit type casting for assignments
like "column=(SELECT ...)" within the SET clause of UPDATE statements. While
implicit casting applies to "INSERT...VALUES", it does not apply to INSERT,
nor UPDATE, when the rows are selected from a Common Table Expression defined
using VALUES(). Query the table schema and explicitly set the types in this
case.

Change-Id: I0affc3a794dd640c5fedf765a5058c38dc353471
2022-11-17 07:48:38 +00:00
Translation updater bot
f7e9e0b537 Localisation updates from https://translatewiki.net.
Change-Id: I780ef72d14b69c1bc64b91e1b9fbe2d48755ce02
2022-11-17 08:14:16 +01:00
jenkins-bot
276b23d2be Merge "SQLPlatform: Check for empty assignment list in upsert" 2022-11-17 05:18:55 +00:00
Aaron Schulz
74153eeb49 rdbms: clarify deleteJoin() slightly
Change-Id: Ie34276fd3e9bb0ede1cae75bc66105a2536c66c4
2022-11-16 20:43:29 -08:00
jenkins-bot
91a758ab85 Merge "Follow redirects for page/{title} formats html/with_html" 2022-11-17 00:58:46 +00:00
jenkins-bot
2deb5fb5f3 Merge "rdbms: Document template SelectQueryBuilder pattern" 2022-11-16 22:36:20 +00:00
Lucas Werkmeister
081368c18b rdbms: Document template SelectQueryBuilder pattern
This pattern is used a few times in MediaWiki core already, e.g. in
ApiQueryBase::select() or UserOptionsMaintenance::updateOptions(); let’s
document it for others. See also MediaWiki code search:
https://codesearch.wmcloud.org/search/?q=clone.*[qQ]uery[bB]uilder&files=%5C.php%24

Bug: T311866
Change-Id: I1c677d9fe57209f9eaab62e5bc2c43519ed53713
2022-11-16 22:19:45 +00:00
C. Scott Ananian
24d69ef952 Deprecate Parser::getFunctionLang()
This is identical to Parser::getTargetLanguage() in modern MediaWiki,
since 7df3473cfe in MW 1.19 (2012).

Bug: T318860
Depends-On: If5fa696e27e84a3aa1343551d7482c933da0a9b6
Depends-On: I87a7ceedce173f6de4bb6722ffe594273c7b0359
Change-Id: Ieed03003095656e69b8e64ed307c6bd67c45c1e7
2022-11-16 16:47:16 -05:00
jenkins-bot
770cb0854b Merge "Remove DifferenceEngine::getDiffBodyCacheKey" 2022-11-16 21:09:46 +00:00
jenkins-bot
351d5989bf Merge "specialpage: Silence known violation unsafe RequestContext changes" 2022-11-16 21:08:58 +00:00