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
We write Parquet files to network shares using Polars, and have found that closing a file occasionally returns an error that is ignored, so we have no indication that there was a failure. This is a wider issue with Rust rather than specific to Polars, eg. see rust-lang/rust#98338, but it would be very helpful for us if Polars could raise these errors when files are closed. For a stronger guarantee that data has been persisted, File::sync_all should be called, but this would have a performance impact for some users, and for the failure scenarios we're concerned about it would be sufficient to just check the return value of close.
Rust doesn't have a close method on files, but it should be possible to implement this fairly easily using the libc and winapi crates, see the close_file crate for example. I suspect that rather than adding a dependency on this old crate Polars might want to reimplement similar functionality.
I'd be happy to implement this change if it would be accepted.
The text was updated successfully, but these errors were encountered:
We understand this problem. It needs some research. The extension trait in close_file for instance doesn't prevent double closing of files. De drop call will close it again.
We write Parquet files to network shares using Polars, and have found that closing a file occasionally returns an error that is ignored, so we have no indication that there was a failure. This is a wider issue with Rust rather than specific to Polars, eg. see rust-lang/rust#98338, but it would be very helpful for us if Polars could raise these errors when files are closed. For a stronger guarantee that data has been persisted,
File::sync_all
should be called, but this would have a performance impact for some users, and for the failure scenarios we're concerned about it would be sufficient to just check the return value of close.Rust doesn't have a close method on files, but it should be possible to implement this fairly easily using the libc and winapi crates, see the close_file crate for example. I suspect that rather than adding a dependency on this old crate Polars might want to reimplement similar functionality.
I'd be happy to implement this change if it would be accepted.
The text was updated successfully, but these errors were encountered: