Page MenuHomePhabricator

Shorten thumbnail name convention
Closed, ResolvedPublic

Description

Some long originals are too long for swift when their thumbnails are made since thumbnail are named like "../<original name>/X-px-stuff-<original name>". Getting rid of the duplication and naming them like "../<original name>/X-px-stuff" would help.

Changing the schema might require a migration script or some temporary rewrite rules to avoid cache stampede.

See sample affected file list below:

File probably having the "Error creating thumbnail: Unable to save thumbnail to destination"
500 19x47 31 [[File:1708_შაჰ-სულთან_ჰუსეინის_ბრძანებულება_ქართლ-კახეთის_საეკლესიო_მამულების_შესახებ.jpg]]
500 48x27 58 [[File:1914-1916_гг._Казарма_лейб-гвардии_3-го_Стрелкового_Его_Императорского_Величества_полка._Фрагмент_фасада..jpg]]
500 18x48 58 [[File:1724_წ_._შაჰ-თამაზ_II-ის_ფირმანი_პაატა-ბეგისადმი_ჯამაგირის_დაშვნის_შესახებ.jpg]]
500 21x47 18 [[File:1705_შაჰ-სულთან_ჰუსეინის_ბრძანებულება_კახეთში_მოთარეშე_დაღესტნელების_დასჯის_შესახებ_.jpg]]
500 23x49 20 [[File:1705_._შაჰ-სულთან_ჰუსეინის_ბრძანებულება_პაატა_ბეგისათვის_ჯამაგირის_დანიშვნის_შესახებ.jpg]]
500 48x35 27 [[File:1934._Модели_шахты_и_паровоза,_сделанные_из_сахара,_шоколада,_мармелада,_экспонированные_на_выставке_Сталинского_района.jpg]]
500 23x47 42 [[File:1597._კახეთის_მეფე_ალექსანდრე_II-ის_გუჯარი_გარეჯის_მეტოქი_აკურის_მონასტრისადმი.jpg]]
500 48x37 50 [[File:1896._Выставочный_стенд_металлургического_завода_Новороссийского_общества_на_выставке_в_Нижнем_Новгороде.jpg]]
500 21x49 30 [[File:1712._ვახტანგ_და_ბაქარ_ბატონიშვილების_სითარხნის_წიგნი_სიონის_მხატვარ_გიორგისადმი.jpg]]
500 34x48 57 [[File:1932._Здание_Артемовского_краеведческого_музея_—_бывшая_церковь,_г._Артемовск,_Донецкой_области,_22_июля.jpg]]
500 48x40 61 [[File:1712._მეფე_შაჰნავაზის_სითარხნის_წიგნი_კარის_დეკანოზ_იესე_ტლაშაძისადმი.jpg]]
500 48x40 49 [[File:1930-е._Собрание_крестьян_одного_из_колхозов_по_случаю_подписания_Государственного_займа,_Донецкая_область.jpg]]
500 48x25 12 [[File:1930-е._Сдача_хлеба_и_сельхозинвентаря_для_организации_колхоза_им._Д._Бедного._с._Удачное_Гришинского_района_Донецкой_области,_1930.jpg]]
500 48x30 43 [[File:1943._Трупи_заживо_спалених_німецькими_окупантами_в_м.Сталіно_науковців_Донецького_Індустріального_Інституту.jpg]]
500 48x33 34 [[File:1930-1932._Распродажа_имущества_раскулаченного_крестьянина_Мартыненко_на_красном_базаре,_с._Удачное_Донецкой_области.jpg]]
500 31x48 27 [[File:1893.აბდულჰამიდ_II-ის_მიერ_იონა_მეუნარგიას_სულთნ_მეჯიდის_ორდენით_დაჯილდოების_სიგელი.jpg]]
500 48x34 52 [[File:1922._Личный_состав_3-го_отделения_милиции._По_краям_сидят_одетые_в_штатское_сотрудники_уголовного_розыска.jpg]]
500 48x32 17 [[File:1931._Труженики_новоорганизованого_колхоза_им._Д._Бедного_перед_выездом_на_весенний_посев,_Гришинский_район_Донецкой_области.jpg]]
500 48x34 48 [[File:1930-е._Митинг_во_время_коллективизации_сельского_хозяйства,_с._Удачное_Гришинского_района_Донецкой_области.jpg]]
500 48x31 53 [[File:1930-1934._Понятые_во_дворе_крестьянина_при_поиске_хлеба_в_одном_из_сел_Гришинского_района_Донецкой_области.jpg]]
500 48x34 49 [[File:1937._Сотрудники_по_борьбе_с_детской_преступностью_и_беспризорностью_отдела_уголовного_розыска_Ленинграда.jpg]]
500 48x37 31 [[File:1930._Доставка_сельскохозяйственного_инвентаря_раскулаченных_крестьян_на_бригадный_двор_с.Удачное_Донецкой_области.jpg]]


Version: 1.20.x
Severity: normal
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=42730

Details

Reference
bz39697

Event Timeline

bzimport raised the priority of this task from to Unbreak Now!.Nov 22 2014, 12:44 AM
bzimport set Reference to bz39697.

Hmm... this'd lead to all the thumbnail files being named things like "500px.jpg", which is subideal when saving to disk (though saving a thumbnail to disk is subideal anyway).

(In reply to comment #1)

Hmm... this'd lead to all the thumbnail files being named things like
"500px.jpg", which is subideal when saving to disk (though saving a thumbnail
to disk is subideal anyway).

Tim also suggestion disposition headers if we really need that.

I'm definitely running into this problem with the Wiki Loves Monuments app and our long Belorussian names; had to trim the maximum 240 bytes in half or so to get thumbnails working.

This issue is still occurring on Commons with 1.20wmf11; what remains to be done? Are there any additional patches that are awaiting review and that we need to escalate?

It would be great to sort this out soon as it affects quite a few participants in WLM.

https://gerrit.wikimedia.org/r/#/c/22930/ needs merging.

Also, nothing happens until a FileRepo config var change is made.

*** Bug 40818 has been marked as a duplicate of this bug. ***

This bug has affected a lot (we do not know how many) of files in the "Wiki Loves Monuments 2012" competition. If this fix is not passed on to the Commons in the coming days, we will need to find and temporarily rename all such files. What are the forecasts?

This change has actually been deployed in configuration now. The files above are giving working urls now. The old urls redirect.

(In reply to comment #11)

This change has actually been deployed in configuration now. The files above
are giving working urls now. The old urls redirect.

Note that this is only done for files with long names for now, not all files.

  • Bug 20312 has been marked as a duplicate of this bug. ***