Page MenuHomePhabricator

update.php should invalidate ResourceLoader message cache
Closed, ResolvedPublic

Description

https://www.mediawiki.org/wiki/Manual:Update.php says "Normally update.php purges the objectcache table in the database (generally contains the parser cache and the messages cache), if you don't want to purge this table, use the --nopurge option."

which is correct. It just deleted everything from objectcache.

However, that doesn't help with ResourceLoader JSON message blobs. Separately, MessageBlobStore::getFromDB says:

// Update the module's blobs if the set of messages changed or if the blob is older than $wgCacheEpoch

I suspect people don't run into this often because extension updates often change the set of messages (e.g. adding some). But if you just change the text, you hit it.

I can't think of any logical reason update.php should clear one message cache, but not another.

I also don't know any other way around this besides changing the epoch or manually messing with the database.

I think the simplest way to do it would be wipe out msg_resource and msg_resource_links . These are regenerated as needed by MessageBlobStore::insertMessageBlob .

It should behave the same in terms of --nopurge.


Version: 1.18.x
Severity: major

Details

Reference
bz44524

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 1:24 AM
bzimport set Reference to bz44524.

Setting milestone to 1.21. This has affected various wikis (not wmf, since we don't use update.php) during upgrades. Also noticed it a couple times on my local dev wiki after updating.

Related URL: https://gerrit.wikimedia.org/r/58319 (Gerrit Change I15ceb60f5e2e4d3ed9ba818fe6cd619f9adce5b2)

(In reply to comment #2)

I15ceb60f5e2e4d3ed9ba818fe6cd619f9adce5b2

Backported to REL1_21 to make it easier for upgraders from 1.20 > 1.21

Related URL: https://gerrit.wikimedia.org/r/58462 (Gerrit Change I15ceb60f5e2e4d3ed9ba818fe6cd619f9adce5b2)