Page MenuHomePhabricator

IcuCollation's 'first-letters' cache key should include the version of ICU and possibly PHP that was used to build the data
Closed, ResolvedPublic

Description

IcuCollation's 'first-letters' cache key should include the version of ICU and possibly PHP that was used to build the data. Otherwise upgrading anything requires you to manually clear the caches.

I encountered this on Labs when preparing a test wiki for bug 54168 – it was set up under HHVM, then I switched to PHP 5.5 because page import doesn't work with HHVM (bug 66023), and then category listings got weird (http://i.imgur.com/Po94jiq.png for http://estonia.wmflabs.org/wiki/Kategooria:Test).

(The data is incompatible between different ICU versions, that's why we generate it dynamically in IcuCollation::getFirstLetterData() and cache instead of storing it in a static file somewhere.)

This is probably a blocker to the Trusty migration? Should be simple to fix.


Version: 1.24rc
Severity: major

Details

Reference
bz68344

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 3:36 AM
bzimport set Reference to bz68344.
bzimport added a subscriber: Unknown Object (MLST).

Change 148251 had a related patch set uploaded by Brian Wolff:
Include ICU version in cache key for collation first letters

https://gerrit.wikimedia.org/r/148251

I can't believe we don't already do this.

I'm not sure how hiphop implements intl though. Is INTL_ICU_VERSION still a constant in hiphop?

(In reply to Bawolff (Brian Wolff) from comment #2)

I'm not sure how hiphop implements intl though. Is INTL_ICU_VERSION still a
constant in hiphop?

Using hhvm in vagrant:
hphpd> var_dump(INTL_ICU_VERSION);
var_dump(INTL_ICU_VERSION);
string(7) "4.8.1.1"

Change 148251 merged by jenkins-bot:
Include ICU version in cache key for collation first letters

https://gerrit.wikimedia.org/r/148251