Skip to content

fix: check the close of lines fsx appends - #94

Merged
HaoZeke merged 1 commit into
developfrom
fix/fsx-appendline-close-check
Nov 26, 2026
Merged

HaoZeke merged 1 commit into
developfrom
fix/fsx-appendline-close-check

Conversation

@HaoZeke

@HaoZeke HaoZeke commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

appendLine returns a failed close. On a network file system (NFS) a lost
write may show up only at the close. The old code discarded that result,
so an append could succeed even though the line never reached the
server.

A close that a signal interrupts counts as success and is not retried,
because the system has already released the descriptor. A failed close
returns its error. The line is not removed: the descriptor is gone, so
the file cannot be safely shortened back to its old size. On an earlier
error the cleanup close ignores its result. The earlier error keeps its
errno.

appendLine returns a failed close. On a network file system (NFS) a lost
write may show up only at the close. The old code discarded that result,
so an append could succeed even though the line never reached the
server.

A close that a signal interrupts counts as success and is not retried,
because the system has already released the descriptor. A failed close
returns its error. The line is not removed: the descriptor is gone, so
the file cannot be safely shortened back to its old size. On an earlier
error the cleanup close ignores its result. The earlier error keeps its
errno.
@HaoZeke
HaoZeke merged commit f363938 into develop Nov 26, 2026
8 checks passed
@HaoZeke
HaoZeke deleted the fix/fsx-appendline-close-check branch November 26, 2026 00:54
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