Page MenuHomePhabricator

Special:EntityData with flavor is cached but not purged properly
Open, HighPublic

Description

URLs like https://www.wikidata.org/wiki/Special:EntityData/Q4115189.ttl?flavor=dump are cached by Varnish but when action=purge is issued, they are not purged since EntityDataUriManager::getCacheableUrls does not account for query parameters. Thus, if the content of Q4115189 is modified, even after purge action it may remain cached and contain stale data.

We need to either fix purge operation to account for flavors (preferably) or disable caching of flavor URLs.

Details

Related Gerrit Patches:
mediawiki/extensions/Wikibase : masterAdd cache purging for flavored Special:EntityData output.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 2 2016, 11:20 PM
Smalyshev added a comment.EditedMar 2 2016, 11:24 PM

May be related to T122867 and T122881 but we probably need a fix before that will be resolved.

hoo added a subscriber: hoo.Mar 3 2016, 1:03 AM
daniel triaged this task as High priority.EditedMar 3 2016, 1:10 PM

We should at least investigate options soon. For that, we should pull in someone who knows about varnish.

Change 275769 had a related patch set uploaded (by Smalyshev):
[WIP] Add cache purging

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

daniel added a comment.Mar 8 2016, 7:53 PM

@Smalyshev Ideally it would be the same entry. And ideally this would Just Work the same as for any wiki page that is requested using the "pretty" vs. the "ugly" URL.

I don't know if we currently do that. But I'd try to rely on the standard mechanism for this, and not do anything special for Wikidata.

After chatting with @BBlack it looks like we do not have any canonicalization mechanism yet and purges basically use the most frequently used URLs and ignore the rest. Which is way far from ideal situation but until we get Xkey (T122881) we probably don't have any better solution. So I'll make a patch with that in mind.

daniel added a comment.Dec 5 2016, 5:34 PM

@Lydia_Pintscher that's basically the same thing, yes. One ticket complains about JSON and one about RDF, but the issue is the same.

We could rely on xkey for purging, see the discussion of xkey at T114662: RFC: Per-language URLs for multilingual wiki pages

Smalyshev removed Smalyshev as the assignee of this task.Feb 8 2017, 7:57 AM

Change 275769 abandoned by Smalyshev:
Add cache purging for flavored Special:EntityData output.

Reason:
Probably will be handled by using xkeys.

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