reidkaufmann commented on code in PR #890:
URL: 
https://github.com/apache/arrow-rs-object-store/pull/890#discussion_r4528898384


##########
src/local.rs:
##########
@@ -653,9 +659,11 @@ impl ObjectStore for LocalFileSystem {
                             // `rename` bundles in the fsync of `to`'s parent 
directory.
                             Ok(_) => match rename(&staged, &to, fsync) {
                                 Ok(_) => return Ok(()),
-                                Err(source) => {
+                                Err(e) => {
                                     let _ = std::fs::remove_file(&staged); // 
Attempt to clean up
-                                    return Err(Error::UnableToCopyFile { from, 
to, source }.into());
+                                    let report =
+                                        |source| Error::UnableToCopyFile { 
from, to, source };
+                                    return Err(e.reported(report).into());

Review Comment:
   Not strictly necessary but related and an improvement worth keeping with the 
PR, should it gain approval.
   
   > a failed fsync is now reported as UnableToSyncFile naming the directory 
that failed, instead of UnableToCopyFile



-- 
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