mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/TitleBlacklist
synced 2024-11-27 15:30:48 +00:00
01985564fa
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 |
||
---|---|---|
.. | ||
Api | ||
Hooks.php | ||
mw.ext.TitleBlacklist.lua | ||
Scribunto_LuaTitleBlacklistLibrary.php | ||
ScribuntoHooks.php | ||
TitleBlacklist.php | ||
TitleBlacklistAuthenticationRequest.php | ||
TitleBlacklistEntry.php | ||
TitleBlacklistPreAuthenticationProvider.php |