You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "zeroshade (via GitHub)" <gi...@apache.org> on 2026/06/18 22:27:41 UTC
[PR] docs(arrow/ipc): document that Writer and FileWriter are not concurrency safe [arrow-go]
zeroshade opened a new pull request, #856:
URL: https://github.com/apache/arrow-go/pull/856
### Rationale for this change
Closes #55.
`arrow/ipc.Writer` and `arrow/ipc.FileWriter` wrap an arbitrary `io.Writer` and write to it without any internal synchronization. Calling `Write` (or `Close`) concurrently from multiple goroutines therefore races on both the underlying sink and the writer's own state, which can interleave output and corrupt the IPC stream — for example writing the schema header more than once, as reported in #55.
Because an arbitrary `io.Writer` cannot be assumed to be safe for concurrent use, the writer cannot make this safe on the caller's behalf. The expectation that callers serialize writes was simply undocumented.
### What changes are included in this PR?
Documentation only. The type doc comments on `Writer` and `FileWriter` now state that they are **not** safe for concurrent use, explain why (interleaved/duplicated output via an unsynchronized `io.Writer`), and direct callers that produce records from multiple goroutines to serialize writes themselves — for example by funneling records through a channel to a single goroutine that owns the writer.
No code or behavior changes.
### Are these changes tested?
No tests are needed — this is a documentation-only change. `gofmt`, `go build`, and `go vet` are clean for `arrow/ipc`.
### Are there any user-facing changes?
No API or behavior changes; only added godoc on `ipc.Writer` and `ipc.FileWriter`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] docs(arrow/ipc): document that Writer and FileWriter are not concurrency safe [arrow-go]
Posted by "zeroshade (via GitHub)" <gi...@apache.org>.
zeroshade merged PR #856:
URL: https://github.com/apache/arrow-go/pull/856
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org