Files
Chronos/i18n
Alby96andClaude Opus 5.5 8ea25228eb fix(convert): reserve the photos still writing, keep photo ids out of the job row, never copy a source twice
Stage A's space guard reserved, before each photo, only that photo and the
ones after it, so at the end of a sequence it counted a single photo while
up to twice the parallelism were still converting: a volume filling
meanwhile could go into the reserve. It now reserves the photo and every
photo started whose converted file has not landed yet (a file lands whole,
by a rename, before it is verified), so nothing in flight is missed and
nothing landed is counted twice, at the end of a sequence as anywhere.

The confirmed photo ids (about 21 MB for a million photos) lived in the
job's parameters, read by every dry run's busy check, by each sequence turn
of the conversion and by the job lists. They are now written whole, under a
job id chosen before the job is queued, into convert-<job>.photos beside
the journal, and go with it; the row keeps each sequence's digest, so the
job still converts exactly the photos confirmed (without the file, the
whole plan made again must match). The busy check reads only ids, kinds and
targets (and a verify's parameters), never the asking job's row; a
conversion's turn reads only its creation time; the server's job list and
dashboard and the engine's queue peeks read jobs without parameters.

A retried New sequence conversion could make a second copy. The journal now
names the copy as soon as its photos are filed; a retry finishes that copy
whatever changed in the source since, never remakes one deleted since, and
needs no space again for what it holds; and a source another conversion
copied in the same format after this one was confirmed is done with, with
no copy made (new outcome Superseded, with its job log line).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 09:36:00 +01:00
..