Last modified: 2014-02-12 23:35:55 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T46428, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 44428 - Handle thumbnail purges when thumbnails are in cache but not in the backend
Handle thumbnail purges when thumbnails are in cache but not in the backend
Status: NEW
Product: MediaWiki
Classification: Unclassified
File management (Other open bugs)
unspecified
All All
: Normal normal with 2 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-01-28 18:04 UTC by Aaron Schulz
Modified: 2014-02-12 23:35 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Aaron Schulz 2013-01-28 18:04:07 UTC
See proposals on bug 41130.

Purge requests are based on the file in the backend, not those in the cache. If they fall out of sync (like if a prior purge is partially completed), then there can be unpurgable images in the cache.

One solution is to use a varnish module to hash all thumbnails for an original version of a file to the same place so that they can all be purged at once. This could be based on a thumbnail url regex, since the source file is the parent directory of the thumbnail.

If a file had 1 current and 2 old versions, the thumbnails would be mapped to 3 different hashes for that file, one for each version. Purge requests could be issues for each of the original versions on ?action=purge (or file deletion and other events) which purge all thumbnails for those 3 versions regardless of what thumbnails are in the backend vs cache.
Comment 1 Aaron Schulz 2013-01-28 18:05:14 UTC
Of course some MediaWiki support will be needed for this in addition to varnish and ops work (re-hashing requires phased mass purging).
Comment 2 Aaron Schulz 2013-02-11 18:54:33 UTC
This approach would have problems if the varnish hash-chain gets too long (many thumbnails for one file), which would require using a different internal structure.

An easier alternative for the user-facing problems that has been floating is versioned URLs (and making backlink invalidation work for Commons).
Comment 3 Bawolff (Brian Wolff) 2013-02-11 19:07:43 UTC
(In reply to comment #2)
> This approach would have problems if the varnish hash-chain gets too long
> (many
> thumbnails for one file), which would require using a different internal
> structure.
> 
> An easier alternative for the user-facing problems that has been floating is
> versioned URLs (and making backlink invalidation work for Commons).

That would also maybe speed things up since then the browser might not have to check if image was modified.

Would need to remember to make sure this doesnt break instant commons. But that already stores files locally, so probably would be ok.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links