Skip to content

Drain pending writes before handling rename or delete - #2

Merged
Mockird31 merged 1 commit into
masterfrom
bigbes/tntp-3131-drain-before-rename
Aug 4, 2026
Merged

Drain pending writes before handling rename or delete#2
Mockird31 merged 1 commit into
masterfrom
bigbes/tntp-3131-drain-before-rename

Conversation

@bigbes

@bigbes bigbes commented Jul 30, 2026

Copy link
Copy Markdown

A write and rename can make both Modified and Deleted ready at the same time. Even with the existing Modified pre-check, Go can select Deleted and close or reopen the file before unread bytes from the old descriptor are consumed.

  • defer rename/delete handling until the current open file reaches EOF
  • preserve the existing reopen or stop behavior after pending data is drained
  • add deterministic regression coverage for a delete notification with unread data

Related: nxadm#72

@bigbes
bigbes force-pushed the bigbes/tntp-3131-drain-before-rename branch from 0e16f7e to e261567 Compare July 31, 2026 14:41
@Mockird31
Mockird31 merged commit 6147437 into master Aug 4, 2026
8 checks passed
@Mockird31 Mockird31 mentioned this pull request Aug 4, 2026
@bigbes
bigbes deleted the bigbes/tntp-3131-drain-before-rename branch August 4, 2026 11:59
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.

3 participants