Page MenuHomePhabricator

old file revisions missing of File:A_Warm_Shade_of_Ivory_-_Henry_Mancini_album_cover.jpg
Open, HighPublicBUG REPORT

Description

I went to hide old revisions of https://en.wikipedia.org/wiki/File:A_Warm_Shade_of_Ivory_-_Henry_Mancini_album_cover.jpg and found the old revisions are stuck again showing "Thumbnail for version as of...." rather than the thumbnails or "No thumbnail"

If you try to view an old file version such as https://upload.wikimedia.org/wikipedia/en/archive/f/fd/20260522000033%21A_Warm_Shade_of_Ivory.jpg you get an error "File not found: /v1/AUTH_mw/wikipedia-en-local-public.fd/archive/f/fd/20260522000033%21A_Warm_Shade_of_Ivory.jpg"

I did a quick check in case this was a single file but found:
https://en.wikipedia.org/wiki/File:Wild_is_Love_-_Nat_King_Cole_album_cover.jpg, https://en.wikipedia.org/wiki/File:Cole_Espa%C3%B1ol_-_Nat_King_Cole_album_cover.jpg, https://en.wikipedia.org/wiki/File:St._Louis_Blues_-_Nat_King_Cole_album_cover.jpg and https://en.wikipedia.org/wiki/File:The_Touch_of_Your_Lips_-_Nat_King_Cole_album_cover.jpg

Event Timeline

TheDJ renamed this task from File old revisions stuck as "Thumbnail for version as of...." again to old file revisions missing of File:A_Warm_Shade_of_Ivory_-_Henry_Mancini_album_cover.jpg.Jun 8 2026, 2:43 PM
TheDJ subscribed.

I wonder if someone attempted to delete these entries (as it's fair use) and the file deletion succeeded, but the history update failed. That's not supposed to happen of course, but would be good to get confirmed.

A similar problem happened not long ago in T423065

I noticed these are all files that were moved and all moved my the same editor, but it may be moved in a certain time period rather than just that editor. I have been unable to find any other file moves with old versions moved in the same time period by other editors to clarify.

This comment was removed by MPGuy2824.

I've done some investigating and taking File:A Warm Shade of Ivory - Henry Mancini album cover.jpg it has 3 old versions that all have return errors, however if you change the name part of the filename to the new name they are valid. So it appears that the files were renamed but presumably the update to the database was not updated. So

Invalid versions:
https://upload.wikimedia.org/wikipedia/en/archive/f/fd/20260522000033%21A_Warm_Shade_of_Ivory.jpg
https://upload.wikimedia.org/wikipedia/en/archive/f/fd/20260521025858%21A_Warm_Shade_of_Ivory.jpg
https://upload.wikimedia.org/wikipedia/en/archive/f/fd/20260521025749%21A_Warm_Shade_of_Ivory.jpg

Valid versions with the new name
https://upload.wikimedia.org/wikipedia/en/archive/f/fd/20260522000033%21A_Warm_Shade_of_Ivory_-_Henry_Mancini_album_cover.jpg
https://upload.wikimedia.org/wikipedia/en/archive/f/fd/20260521025858%21A_Warm_Shade_of_Ivory_-_Henry_Mancini_album_cover.jpg
https://upload.wikimedia.org/wikipedia/en/archive/f/fd/20260521025749%21A_Warm_Shade_of_Ivory_-_Henry_Mancini_album_cover.jpg

Would there maybe be a log of the failures to be used to fix these up? If not I would look at file moves done by Liandrei 22-24 of May (about 15 files)

We only keep swift logs for a few days (because of the large volume of them), so we won't have any swift logs from 22 May.

If I'm reading the ticket correctly, this looks like a rename on swift that didn't get correctly recorded in the database? So tagging in DBA for them to have a look.

@Zabe since this is enwiki and we are read new there. Maybe it's related to the file refactor work. Would you mind taking a look just to confirm/reject the hypothesis?

I can confirm it is related to the file migration schema. I set mw-experimental to read old and the correct thumbnails appear.

And yes, we apparently have drifts in fr_archive_name.

wikiadmin2023@10.64.0.142(enwiki)> select oi_archive_name from oldimage where oi_name = 'A_Warm_Shade_of_Ivory_-_Henry_Mancini_album_cover.jpg';
+----------------------------------------------------------------------+
| oi_archive_name                                                      |
+----------------------------------------------------------------------+
| 20260521025749!A_Warm_Shade_of_Ivory_-_Henry_Mancini_album_cover.jpg |
| 20260521025858!A_Warm_Shade_of_Ivory_-_Henry_Mancini_album_cover.jpg |
| 20260522000033!A_Warm_Shade_of_Ivory_-_Henry_Mancini_album_cover.jpg |
+----------------------------------------------------------------------+
3 rows in set (0.003 sec)

wikiadmin2023@10.64.0.142(enwiki)> select fr_archive_name from filerevision join file on file_id = fr_file where file_name = 'A_Warm_Shade_of_Ivory_-_Henry_Mancini_album_cover.jpg';
+------------------------------------------+
| fr_archive_name                          |
+------------------------------------------+
| 20260521025749!A_Warm_Shade_of_Ivory.jpg |
| 20260521025858!A_Warm_Shade_of_Ivory.jpg |
| 20260522000033!A_Warm_Shade_of_Ivory.jpg |
|                                          |
+------------------------------------------+
4 rows in set (0.001 sec)

wikiadmin2023@10.64.0.142(enwiki)>

(The last empty row in the filerevision query is the current version of the file)

Zabe triaged this task as High priority.Jun 17 2026, 9:11 PM

Change #1303568 had a related patch set uploaded (by Zabe; author: Zabe):

[mediawiki/core@master] LocalFileMoveBatch: Also update fr_archive_name when moving file

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

Change #1303569 had a related patch set uploaded (by Zabe; author: Zabe):

[mediawiki/extensions/WikimediaMaintenance@master] Add script to fix fr_archive_name drifts

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

Change #1303568 merged by jenkins-bot:

[mediawiki/core@master] LocalFileMoveBatch: Also update fr_archive_name when moving file

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

Change #1303569 merged by jenkins-bot:

[mediawiki/extensions/WikimediaMaintenance@master] Add script to fix fr_archive_name drifts

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

Change #1303976 had a related patch set uploaded (by Zabe; author: Zabe):

[mediawiki/core@REL1_46] LocalFileMoveBatch: Also update fr_archive_name when moving file

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

Change #1303977 had a related patch set uploaded (by Zabe; author: Zabe):

[mediawiki/core@REL1_45] LocalFileMoveBatch: Also update fr_archive_name when moving file

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

Change #1303978 had a related patch set uploaded (by Zabe; author: Zabe):

[mediawiki/core@REL1_44] LocalFileMoveBatch: Also update fr_archive_name when moving file

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

Change #1303981 had a related patch set uploaded (by Zabe; author: Zabe):

[mediawiki/core@wmf/1.47.0-wmf.7] LocalFileMoveBatch: Also update fr_archive_name when moving file

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

Change #1303976 merged by jenkins-bot:

[mediawiki/core@REL1_46] LocalFileMoveBatch: Also update fr_archive_name when moving file

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

Change #1303978 merged by jenkins-bot:

[mediawiki/core@REL1_44] LocalFileMoveBatch: Also update fr_archive_name when moving file

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

Change #1303977 merged by jenkins-bot:

[mediawiki/core@REL1_45] LocalFileMoveBatch: Also update fr_archive_name when moving file

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

Change #1303981 merged by jenkins-bot:

[mediawiki/core@wmf/1.47.0-wmf.7] LocalFileMoveBatch: Also update fr_archive_name when moving file

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

Mentioned in SAL (#wikimedia-operations) [2026-06-18T15:49:02Z] <zabe@deploy1003> Started scap sync-world: Backport for [[gerrit:1303981|LocalFileMoveBatch: Also update fr_archive_name when moving file (T428406)]]

Mentioned in SAL (#wikimedia-operations) [2026-06-18T15:51:08Z] <zabe@deploy1003> zabe: Backport for [[gerrit:1303981|LocalFileMoveBatch: Also update fr_archive_name when moving file (T428406)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2026-06-18T15:55:51Z] <zabe@deploy1003> Finished scap sync-world: Backport for [[gerrit:1303981|LocalFileMoveBatch: Also update fr_archive_name when moving file (T428406)]] (duration: 06m 49s)

Change #1304112 had a related patch set uploaded (by Zabe; author: Zabe):

[mediawiki/extensions/WikimediaMaintenance@wmf/1.47.0-wmf.7] Add script to fix fr_archive_name drifts

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

Change #1304112 merged by jenkins-bot:

[mediawiki/extensions/WikimediaMaintenance@wmf/1.47.0-wmf.7] Add script to fix fr_archive_name drifts

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

Mentioned in SAL (#wikimedia-operations) [2026-06-18T16:22:06Z] <zabe@deploy1003> Started scap sync-world: Backport for [[gerrit:1304112|Add script to fix fr_archive_name drifts (T428406)]]

Mentioned in SAL (#wikimedia-operations) [2026-06-18T16:24:05Z] <zabe@deploy1003> zabe: Backport for [[gerrit:1304112|Add script to fix fr_archive_name drifts (T428406)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2026-06-18T16:28:52Z] <zabe@deploy1003> Finished scap sync-world: Backport for [[gerrit:1304112|Add script to fix fr_archive_name drifts (T428406)]] (duration: 06m 46s)

we really should have some sort 'health check' when we drop the old stuff. A bug similar to this is how some early 3rd party adopters lost a bunch of actor entries at some point. We added the migration, there was a problem that we discovered, we fixed the code and then when we dropped the table like a year later, suddenly people reported in that they were missing a bunch of their data because they had only ever ran the first migration but they had not ran the cleanup script before we dropped the table.