From be1d690bb9fb121676a38c0f8aa9430d6ed1460c Mon Sep 17 00:00:00 2001 From: pchintar <89355405+pchintar@users.noreply.github.com> Date: Sat, 18 Apr 2026 17:13:44 -0400 Subject: [PATCH] Remove per-message flush in IPC writer hot path --- arrow-ipc/src/writer.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arrow-ipc/src/writer.rs b/arrow-ipc/src/writer.rs index 9d3fca293874..5fc4027a8f6a 100644 --- a/arrow-ipc/src/writer.rs +++ b/arrow-ipc/src/writer.rs @@ -1467,6 +1467,7 @@ impl StreamWriter { } write_continuation(&mut self.writer, &self.write_options, 0)?; + self.writer.flush()?; self.finished = true; @@ -1618,7 +1619,6 @@ fn write_body_buffers( writer.write_all(&PADDING[..pad_len])?; } - writer.flush()?; Ok(total_len) } @@ -1652,8 +1652,6 @@ fn write_continuation( z => panic!("Unsupported crate::MetadataVersion {z:?}"), }; - writer.flush()?; - Ok(written) }