jgiannuzzi opened a new issue, #661:
URL: https://github.com/apache/arrow-rs-object-store/issues/661

   **Is your feature request related to a problem or challenge? Please describe 
what you are trying to do.**
   <!--
   A clear and concise description of what the problem is. Ex. I'm always 
frustrated when [...] 
   (This section helps Arrow developers understand the context and *why* for 
this feature, in addition to  the *what*)
   -->
   
   Rust's `File::drop()` silently ignores errors from the underlying `close()` 
syscall. On network filesystems like NFS, `close()` can fail and indicate data 
loss, but currently `LocalFileSystem` has no way to detect this. Data may 
appear to be written successfully while the server actually reports an error 
that is never surfaced to the caller.
   
   Additionally, for workloads requiring stronger durability guarantees, there 
is no way to ensure data is flushed to persistent storage before the file is 
closed and renamed into place.
   
   **Describe the solution you'd like**
   <!--
   A clear and concise description of what you want to happen.
   -->
   
   1. Explicit close with error checking: replace the silent drop with 
platform-specific close calls that propagate errors back to the caller.
   2. Opt-in "sync on close" behaviour: add a builder method on 
`LocalFileSystem` that calls `File::sync_all()` before closing, providing 
stronger durability guarantees at the cost of performance.
   
   **Describe alternatives you've considered**
   <!--
   A clear and concise description of any alternative solutions or features 
you've considered.
   -->
   
   We could always call `File::sync_all()` but it would be too expensive for 
local disks where it's unnecessary.
   
   **Additional context**
   <!--
   Add any other context or screenshots about the feature request here.
   -->
   
   Polars ran into the same issue: 
https://github.com/pola-rs/polars/issues/21002.
   It got fixed in https://github.com/pola-rs/polars/pull/21588.
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to