fix(reorganize): a rename journal that cannot be read no longer stops the archive from opening

An archive open lists the pending rename plans; one journal that was not valid JSON threw out of
ArchiveService.OpenAsync, so the archive (and the server, at boot) did not open until the file was
removed by hand. It is now logged and left in place; its own job fails with the reason instead of
planning again over a half-applied plan.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alby96andClaude Opus 5.5 committed 2026-10-27 19:50:32 +01:00
1 parent 074d09839a
commit 0c2bdedfdf
5 files changed
+59 -8

No files matched your search

@@ -155,7 +155,7 @@ internal sealed class MoveJobHandler(ChronosDatabase db, MassRenamer renamer, Fu
Log.Info("archive", $"Reorganize {planId} held by its failed job {context.Job.Id}");
LogDone(context, journal.Plan, RenameResult.Of(journal.Done));
}
catch (Exception ex) when (ex is IOException or UnauthorizedAccessException or JsonException)
catch (Exception ex) when (ex is IOException or UnauthorizedAccessException or JsonException or InvalidDataException)
{
Log.Warning("archive", $"Reorganize {planId} could not be held after its job failed", ex);
}