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

Copy Markdown View Source

Recomputes the MD5 checksums the upload API used to record (G12), as a job run (storage.checksum_backfill): a file stored with a 32-hex-character checksum has its original read and its SHA-256 and matching user_file_checksum recorded, twenty a batch, in uuid order, five seconds apart on the file_processing queue.

The work of a batch is PhoenixKit.Modules.Storage.Workers.ChecksumBackfillJob's (run_batch/2). Started after boot and by the daily trash prune while any MD5 row is left (ChecksumBackfillJob.maybe_enqueue/0).

done counts the files handled (updated, left because their uploader has the bytes already, or edited meanwhile — all final), failed those whose original could not be read (marked, so a later pass does not download them again). Replaying a batch is safe: the update is guarded on the old checksum. restart/0 is :merge.