Skip to content

fix(storage): publish manifest changes after durable writes - #645

Merged
zzylol merged 1 commit into
mainfrom
fix/manifest-durable-publication
Sep 11, 2026
Merged

zzylol merged 1 commit into
mainfrom
fix/manifest-durable-publication

Conversation

@zzylol

@zzylol zzylol commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Manifest failures must not expose uncommitted parts or make a successful part publication look retryable.

Serialize append and compaction through the existing mutation mutex. Write and sync the log before publishing the live change. Roll back failed writes to the original log length; if rollback cannot be made durable, reject further writes and compaction until reopen. Optional compaction failure no longer turns a committed append into an error.

Before this PR: add/delete changed the live set before persistence, and compaction could race with append. A flusher retry could expose duplicated source epochs under a new part ID.

After this PR: failed publication keeps the prior live set, and serialized compaction preserves committed records.

Verification: six focused tests passed, including failed add/delete, ambiguous-write rejection, and concurrent append/compaction with restart. Independent source review passed; CI is pending.

This does not claim exhaustive power-loss correctness; existing snapshot directory-sync behavior is outside this change. Performance measurements and screenshots are not applicable.

@zzylol
zzylol marked this pull request as ready for review September 11, 2026 13:10
@zzylol
zzylol merged commit 08cc10e into main Sep 11, 2026
1 check 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