PhoenixKit.Modules.Storage.Jobs.LocationBackfill (phoenix_kit v2.52.2)

Copy Markdown View Source

Records where the objects stored before location-truth are (V204), as a job run (storage.location_backfill): the instances no writer recorded a bucket for (Tessera tiles, comment attachments) are checked against every enabled bucket once, fifty a batch, in uuid order, with a five-second pause between batches on the file_processing queue so a large or remote bucket is walked at a steady pace. An admin sees how far it is on Admin → Jobs and can pause or cancel it.

The work of a batch is PhoenixKit.Modules.Storage.Workers.LocationBackfillJob's (run_batch/2 there). Started by the application shortly after boot and by the daily trash prune whenever any instance is unchecked (LocationBackfillJob.maybe_enqueue/0).

done counts the instances that were checked (found somewhere, or found in no bucket — a miss is remembered), failed those a bucket could not answer for: they stay unchecked for the next pass. Replaying a batch is safe (checking is idempotent). restart/0 is :merge: a second trigger changes nothing.