Skip to content

fix(log): retry a run whose manifest was not logged - #6

Merged
HaoZeke merged 2 commits into
mainfrom
fix/run-retry
Nov 16, 2026
Merged

HaoZeke merged 2 commits into
mainfrom
fix/run-retry

Conversation

@HaoZeke

@HaoZeke HaoZeke commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

A seal or compaction retried after its manifest append failed, or after a crash between storing the run file and logging the manifest, now logs the run.

  • log_run stored the run file with create_new before it appended the manifest naming it. When that append failed, or a crash came between the two, the run file stayed, and every later seal of the same entry range found it and refused with "a run for that entry range is already stored".
  • When create_new finds a run file at the path, log_run now reads it and goes on to append the manifest if the bytes are the run it encoded. Other bytes for the range are still refused.
  • The test fails the put of the bundle carrying the manifest, reopens the store and expects the second seal to log the run.

The branch has a towncrier fragment.

log_run stores the run file with create_new before it appends the
manifest naming it. When that append fails, or a crash comes between
the two, the run file stays, and every later seal of the same entry
range finds it and refuses with "a run for that entry range is already
stored": the log cannot be sealed again until someone deletes the file
by hand. The test fails the put of the bundle carrying the manifest,
reopens the store and expects the second seal to log the run.
When create_new finds a run file at the path, log_run now reads it and
goes on to append the manifest if the bytes are the run it encoded. A
run file is part of the log only through a manifest that binds its
hash, so the leftover of a failed or interrupted seal or compaction is
that same run. Other bytes for the range are still refused, as another
run.
@HaoZeke
HaoZeke merged commit 56d36e0 into main Nov 16, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant