Skip to content

Close the journal fragment before deleting it - #1261

Merged
noha merged 1 commit into
mainfrom
close-the-fragment-before-deleting-it
Sep 15, 2026
Merged

noha merged 1 commit into
mainfrom
close-the-fragment-before-deleting-it

Conversation

@noha

@noha noha commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Copying the source journal into a backup first clears the target's own fragment. That fragment is opened lazily, the first time anything touches the target's journal, and Windows refuses to delete a file that is still open; on POSIX the unlink succeeds and the open handle keeps the old inode alive, so this only ever showed on Windows.

It is now closed before the delete and forgotten afterwards, so the next write opens a fresh one.

Copying the source journal into a backup first clears the target's own
fragment. That fragment is opened lazily, the first time anything
touches the target's journal, and Windows refuses to delete a file that
is still open; on POSIX the unlink succeeds and the open handle keeps
the old inode alive, so this only ever showed on Windows.

It is now closed before the delete and forgotten afterwards, so the next
write opens a fresh one.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@noha
noha merged commit c29a6e3 into main Sep 15, 2026
@noha
noha deleted the close-the-fragment-before-deleting-it branch September 15, 2026 20:36

@MarcusDenker MarcusDenker left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

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.

2 participants