Lucas_Werkmeister_WMDE added a comment.
Note: the practical impact of this issue is that any Wikibase developer on PHP 8.2 will need to disable deprecation warnings on their wiki (I use `error_reporting( E_ALL & ~E_DEPRECATED ); // T324202`). In Wikidata team prioritization terms, I’d say that this affects developers (but it sounds like this task isn’t prioritized for us). --- > We should remove both method calls. (But we’ll need to tweak the cache key at the same time, to ensure that old mojibake serializations don’t get deserialized without the utf8_decode().) Given that this cache is (AFAICT) used among other things for the term store / formatter cache, where it has a very high absolute hit rate (over a million hits per minute <https://grafana.wikimedia.org/d/000000548/wikibase-sql-term-storage?orgId=1&refresh=30s&viewPanel=9>) and a pretty good relative hit rate (ca. 98% <https://grafana.wikimedia.org/d/000000548/wikibase-sql-term-storage?orgId=1&refresh=30s&viewPanel=8>), I don’t think we can afford to just switch out the cache key without having some kind of fallback for the old value, unfortunately. But instead of changing the cache key, I think we can do something clever in `SimpleCacheWithBagOStuff::unserialize()`, between the `json_decode()` and the `utf8_decode()` – so that both “old-style” and “new-style” entries are stored in the underlying cache using the same key, but we detect whether to call `utf8_decode()` based on the JSON structure. (Maybe “new-style” values have an extra array element in the JSON after the `$signatureToCheck` and `$data`, or whatever.) That way we keep the key the same and only hit the underlying cache once rather than twice. TASK DETAIL https://phabricator.wikimedia.org/T324202 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Lucas_Werkmeister_WMDE Cc: Aklapper, Lucas_Werkmeister_WMDE, Danny_Benjafield_WMDE, Astuthiodit_1, malberts, karapayneWMDE, Invadibot, maantietaja, ItamarWMDE, Akuckartz, Nandana, Lahi, Gq86, GoranSMilovanovic, TK-999, QZanden, LawExplorer, _jensen, rosalieper, Scott_WUaS, Wikidata-bugs, aude, Mbch331
_______________________________________________ Wikidata-bugs mailing list -- [email protected] To unsubscribe send an email to [email protected]
