Repository navigation
fix(log): retry a run whose manifest was not logged - #6
Merged
Merged
Conversation
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
force-pushed
the
fix/run-retry
branch
from
November 16, 2026 05:50
4361f19 to
48ea992
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_runstored the run file withcreate_newbefore 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".create_newfinds a run file at the path,log_runnow 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 branch has a towncrier fragment.