You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
apache_avro::Writer::flush does not call std::io::Write::flush on the inner writer #10
The Rust documentation for apache_avro::Writer::flush describes the function as follows:
Flush the content appended to a Writer. Call this function to make sure all the content has been written before releasing the Writer.
However, this function does not actually guarantee that all the content will be written out after the flush() call, because it does not call std::io::Write::flush on the inner writer.
This can be a problem when the inner writer uses its own buffer.
In this example, the internal BufWriter had not yet flushed its internal buffer after writer.flush().unwrap() was called. In fact, the buffer is only written out once writer is dropped.
Solution
std::io::Write::flush should be called on the inner writer at the end of apache_avro::Writer::flush.
Activity
snowsignal commentedon Sep 27, 2024
@martin-g Could you add me as an assignee to this issue? Thanks!
martin-g commentedon Sep 27, 2024
Only members of the Avro team could be assigned.
Your comment is enough!
Thank you!
Issue apache#10 - Return TestResult. Avoid .unwrap() when possible
Issue apache#10 - Replace the usage of `Arc<Mutex<Vec>>` with `Rc<Ref…