fix(reorganize): a sequence still receiving photos keeps its file names and the job goes on
A Reorganize with a file template failed its job at the step of a sequence
a camera was still uploading into, and its retry gave the rest up. Photos
changed since the plan now never refuse a step: that sequence keeps its file
names (FilesKept), its folder and title change as planned, the other steps go
on and the job ends with ReorganizeKept. The fingerprint, the job's
confirmation and the check under the leases pin file renames by their digest
instead of the frames version, so photos filed under the names the plan gives
them no longer make a dry run or a queued job stale.
- A step whose folder or files a template names after {title} checks the
title as a retitle does (RenameStep.NamedByTitle): no name comes from a
title edited since the plan.
- Recovery sends a photo that already took its new name back together with a
companion whose new name was taken, so the two never end up apart.
- ArchiveService.OpenAsync logs a NewerFormatException from resuming a plan
and keeps its journal, so a server still boots.
- Once a step's folder moved, every index row of the step follows it even
when a sidecar cannot be read or written; the step then fails for a retry.
- Job log lines and errors give the real reason for files kept busy (in use
or a new name taken) and for a sidecar of a newer format (new Newer
outcome; strings en and it).
- A plan an archive open completes tells sequenceChanged; the docs that
promised more than that are corrected.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit f8554b8af0828ab9b0ff128e694abacdd53e6fd7)
This commit is contained in:
1 parent
59ee982e4d
commit
9e1f109b58
16 files changed
+560
-195
No files matched your search
@@ -137,9 +137,12 @@ public static class ArchiveEndpoints
|
||||
/// <c>invalid_template</c> (details: <c>folderTemplate</c>, <c>fileTemplate</c> or <c>titleTemplate</c>); 404
|
||||
/// <c>not_found</c> (<c>sequence</c>: not in the archive); 409 <c>nested_target</c> (details: the folder that would lie
|
||||
/// inside a sequence's folder), <c>plan_changed</c> (details: the fingerprint now), <c>job_unavailable</c>; 503
|
||||
/// <c>archive_offline</c>. Audited; the job tells every sequence it changes as <c>sequenceChanged</c>
|
||||
/// (<c>reorganized</c>). A dry run's plan is kept a few minutes while the index stays as it was
|
||||
/// (<see cref="ReorganizePlanCache"/>): the same dry run again, and its confirmation, take it instead of planning again.
|
||||
/// <c>archive_offline</c>. Audited; the job tells each sequence it changes as <c>sequenceChanged</c> (<c>reorganized</c>)
|
||||
/// once that sequence's step is journaled (a step that failed half-way, when its retry completes it; a plan the server
|
||||
/// completes as it starts, no one: no client is connected yet). Photos a sequence receives between the dry run and the
|
||||
/// confirmation under the names the plan leaves them keep the fingerprint as it was. A dry run's plan is kept a few
|
||||
/// minutes while the index stays as it was (<see cref="ReorganizePlanCache"/>): the same dry run again, and its
|
||||
/// confirmation, take it instead of planning again.
|
||||
/// </summary>
|
||||
private static async Task<IResult> ReorganizeAsync(HttpContext context, Caller caller, ReorganizeRequest request, ChronosDatabase db, ServerArchive archive,
|
||||
[FromServices] ArchiveService? archives, JobEngineHost host, AuditLog audit, ReorganizePlanCache plans)
|
||||
|
||||
Reference in new issue
Block a user