Skip to content

feat(ipc): Remove per-message flush in IPC writer hot path#9763

Open
pchintar wants to merge 1 commit intoapache:mainfrom
pchintar:remove-ipc-flush-hotpath
Open

feat(ipc): Remove per-message flush in IPC writer hot path#9763
pchintar wants to merge 1 commit intoapache:mainfrom
pchintar:remove-ipc-flush-hotpath

Conversation

@pchintar
Copy link
Copy Markdown

Which issue does this PR close?

Rationale for this change

Currently, flush() is called unconditionally in write_body_buffers and write_continuation - both executed per batch. This forces per-batch syscalls, breaks write coalescing, and adds unnecessary overhead. These flushes are not required for correctness (IPC boundaries are length-prefixed, no durability guarantees).

What changes are included in this PR?

  • Remove flush() from write_body_buffers and write_continuation
  • Add self.writer.flush()? to StreamWriter::finish() (missing; FileWriter::finish() already has it)

Are these changes tested?

Yes the changes were tested successfully by running:

cargo test -p arrow-ipc
cargo fmt --all
cargo clippy --all-targets --all-features -- -D warnings

Are there any user-facing changes?

No, There are no changes made to any Public APIs

@github-actions github-actions bot added the arrow Changes to the arrow crate label Apr 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arrow Changes to the arrow crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove per-message flush overhead in Arrow IPC writer

1 participant