Go to file
thiemowmde 01985564fa Fix flipped version number comparison for the whitelist
I don't know much about this codebase, but I'm pretty sure this is
a mistake. The point of such a version number is usually that we can
invalidate old data from the cache in case we make changes to the
format. Let's say the data in the cache is stored with version 3. Now
we increase it in the code to 4. The next time the cache is read the
numbers don't match and the cache is repopulated with new data,
including the new version number.

I think what the != comparison did was the opposite: The code is
constantly throwing away perfectly fine data and re-creating it over
and over again, except when the version number is increased. Only
then old (but now outdated, possibly even incompatible) data is used.
I don't know if it's ever invalidated in this case. Do objects in the
WANObjectCache get refreshed even if they are constantly in use?

Maybe we are lucky and this never had any consequences, except for
performance.

This bug exists ever since this code was added in 2007, see esp.
https://phabricator.wikimedia.org/rETBLb7bc8af6
That patch even mentions this exact issue when it says "make cache
version check really work", but fixes it only in one of the two
places.

Change-Id: I48ab5d5abd6018a846349c5d4c4ed041dd925389
2024-08-16 15:36:25 +02:00
.phan build: Upgrade mediawiki/mediawiki-phan-config from 0.5.0 to 0.6.0 2019-05-19 12:30:07 +00:00
i18n Localisation updates from https://translatewiki.net. 2024-08-05 09:25:56 +02:00
includes Fix flipped version number comparison for the whitelist 2024-08-16 15:36:25 +02:00
modules Show titleblacklist error message in html when using js api module 2024-07-16 22:57:46 +02:00
tests/phpunit Use overrideConfigValue instead of setMwGlobals 2024-07-29 20:55:45 +00:00
.eslintrc.json build: Updating eslint-config-wikimedia to 0.28.2 2024-06-22 03:22:31 +00:00
.gitignore build: Upgrade eslint-config-wikimedia 0.12.0, drop grunt-jsonlint 2019-05-07 11:06:43 -07:00
.gitreview Whoops, track not trace 2016-10-24 17:03:56 -07:00
.phpcs.xml build: Updating mediawiki/mediawiki-codesniffer to 41.0.0 2023-03-12 12:31:07 +00:00
CODE_OF_CONDUCT.md build: Updating mediawiki/phan-taint-check-plugin to 1.3.0 2018-08-19 17:15:38 +00:00
composer.json build: Updating mediawiki/mediawiki-codesniffer to 44.0.0 2024-08-13 00:41:38 +00:00
COPYING
extension.json Declare grant risk levels 2024-01-18 22:29:07 -08:00
Gruntfile.js build: Updating dependencies 2021-01-30 16:18:07 +00:00
package-lock.json build: Updating eslint-config-wikimedia to 0.28.2 2024-06-22 03:22:31 +00:00
package.json build: Updating eslint-config-wikimedia to 0.28.2 2024-06-22 03:22:31 +00:00