Page MenuHomePhabricator

rebuild localisation cache whenever needed
Closed, ResolvedPublic

Description

Beta LocalisationCache uses cdb files placed in /home/wikipedia/common/php/cache/l10n . Since MediaWiki language files are shared among apaches through a NFS share, scap is never used and the rebuildLocalisationCache.php script is never triggered.

As a workaround, one can manually run the following command:

mwscript rebuildLocalisationCache.php --wiki=aawiki


Version: unspecified
Severity: minor

Details

Reference
bz37061

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 12:29 AM
bzimport set Reference to bz37061.
bzimport added a subscriber: Unknown Object (MLST).

Maybe l10n cache has an option to automatically rebuild a language cache whenever its Messages files have been updated.

Seems a step to be done after update. A update-cache-if-updated wouldn't work, as doing that in the apaches would cause contention.
Also, the LocalisationCache::recache() doesn't seem to be atomic, so if an apache is trying to load the data while we are writing the files, it could end up with no localisation.
This is part of course of the bigger problem of version mismatch during upgrades.

That will be done with scap whenever it is ready : bug 37078

Gerrit change 22673 has been merged in. The beta autouploader calls the l10n cache rebuild after having updated the extension. That fix this issue.