You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
image_scales catalog metadata freezes whatever URL was resolvable at index time. Several routine situations leave entries that are stale or suboptimal, and nothing brings them back on its own:
Fresh uploads can never bake a direct Thumbor URL.reindexObject() runs inside the creating transaction, where the image blob has no committed TID yet — ZODB assigns OID/serial during commit. get_blob_ids() therefore returns None (it explicitly rejects z64 serials), _build_thumbor_url() returns None, and the uid fallback URL gets indexed instead.
Blob replacement changes a blob's TID. Any already-indexed direct Thumbor URL for that object points at the previous TID.
Since #17, uid URLs heal on traversal, so none of this is broken — but every healed request costs a 302 through Plone, which is precisely the hop image_scales exists to avoid.
What is missing
A maintenance job that periodically refreshes image_scales for only the objects that changed since the last run, rather than the all-or-nothing full walk that exists today.
Rough shape:
select candidates by modification watermark (not a full catalog walk)
reindex image_scales only — no other indexes, no object rewrite
chunked and resumable, with the watermark persisted per run
safe to run unattended on a site with ~139k objects
Upcoming Thumbor source derivative work (downscaled, colour-normalised source blob chosen in preference to the original): derivatives likewise only receive a TID after commit, so a backfill has to reindex in a later pass. That spec deliberately scopes the periodic job out, on the assumption it is solved here.
Out of scope
Changing when or how URLs are generated. This is purely about keeping already-correct generation reflected in the catalog over time.
Problem
image_scalescatalog metadata freezes whatever URL was resolvable at index time. Several routine situations leave entries that are stale or suboptimal, and nothing brings them back on its own:reindexObject()runs inside the creating transaction, where the image blob has no committed TID yet — ZODB assigns OID/serial during commit.get_blob_ids()therefore returnsNone(it explicitly rejectsz64serials),_build_thumbor_url()returnsNone, and the uid fallback URL gets indexed instead.@@imagesURLs rather than Thumbor URLs — see image_scales metadata gets @@images URLs (not thumbor) when indexed outside a request #14.Since #17, uid URLs heal on traversal, so none of this is broken — but every healed request costs a 302 through Plone, which is precisely the hop
image_scalesexists to avoid.What is missing
A maintenance job that periodically refreshes
image_scalesfor only the objects that changed since the last run, rather than the all-or-nothing full walk that exists today.Rough shape:
image_scalesonly — no other indexes, no object rewriteRelationship to other issues
purge_scalesneeds chunking and resumability for the same reason; the traversal/batching machinery should be shared rather than written twice.Out of scope
Changing when or how URLs are generated. This is purely about keeping already-correct generation reflected in the catalog over time.