Skip to content

fix(arrow/ipc): make writer failures terminal - #1047

Merged
zeroshade merged 9 commits into
apache:mainfrom
fallintoplace:fix/ipc-writer-terminal-errors
Aug 7, 2026
Merged

fix(arrow/ipc): make writer failures terminal#1047
zeroshade merged 9 commits into
apache:mainfrom
fallintoplace:fix/ipc-writer-terminal-errors

Conversation

@fallintoplace

@fallintoplace fallintoplace commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Rationale for this change

An IPC writer can fail after writing part of a schema, dictionary, or record payload. The writer must not continue with stale state or lose the first failure.

What changes are included in this PR?

Keep the first terminal error, mark the writer as started before schema payloads are written, close a started payload writer exactly once, preserve close and panic failures, and release retained dictionaries. Closing without a schema still returns arrow.ErrInvalid.

Are these changes tested?

  • go test ./arrow/ipc

Are there any user-facing changes?

Yes. After a terminal write or close failure, later writes return the stored error instead of continuing with stale writer state.

@fallintoplace
fallintoplace requested a review from zeroshade as a code owner July 28, 2026 23:35
Comment thread arrow/ipc/writer.go Outdated
Comment thread arrow/ipc/writer.go
Comment thread arrow/ipc/writer.go Outdated
Comment thread arrow/ipc/writer.go Outdated
Comment thread arrow/ipc/writer.go Outdated
Comment thread arrow/ipc/writer.go Outdated
Comment thread arrow/ipc/writer.go Outdated
Comment on lines +65 to +68
func writeFull(w io.Writer, p []byte) error {
_, err := w.Write(p)
return err
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

at this point why even have the writeFull function instead of just putting everything back to being _, err = w.Write(paddingBytes[:padding]) etc.?

@fallintoplace fallintoplace changed the title fix(arrow/ipc): make payload write failures terminal fix(arrow/ipc): stop writers after payload failures Aug 5, 2026
@fallintoplace
fallintoplace force-pushed the fix/ipc-writer-terminal-errors branch from 29c742d to 91322f2 Compare August 5, 2026 23:37
@fallintoplace fallintoplace changed the title fix(arrow/ipc): stop writers after payload failures fix(arrow/ipc): make writer failures terminal Aug 6, 2026
@zeroshade
zeroshade merged commit 6fc8578 into apache:main Aug 7, 2026
11 of 27 checks 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.

2 participants