thinkharderdev commented on code in PR #3967: URL: https://github.com/apache/arrow-rs/pull/3967#discussion_r1150820905
########## parquet/src/arrow/async_writer/mod.rs: ########## @@ -135,64 +135,68 @@ impl<W: AsyncWrite + Unpin + Send> AsyncArrowWriter<W> { let metadata = self.sync_writer.close()?; // Force to flush the remaining data. - Self::try_flush(&self.shared_buffer, &mut self.async_writer, 0).await?; + Self::try_flush(&mut self.shared_buffer, &mut self.async_writer, 0).await?; Ok(metadata) } /// Flush the data in the [`SharedBuffer`] into the `async_writer` if its size /// exceeds the threshold. async fn try_flush( - shared_buffer: &SharedBuffer, + shared_buffer: &mut SharedBuffer, Review Comment: Ah right the async writer would also need a reference. I suppose you could hold an `Arc<Vec<u8>>` in the the async writer and then have `SharedBuffer` hold a `Weak<Vec<u8>>`. Not sure that would end up pencilling out just to remove an uncontended mutex lock though. -- 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-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org