tustvold commented on code in PR #5094:
URL: https://github.com/apache/arrow-rs/pull/5094#discussion_r1398470413


##########
object_store/src/local.rs:
##########
@@ -338,28 +338,39 @@ impl ObjectStore for LocalFileSystem {
         maybe_spawn_blocking(move || {
             let (mut file, suffix) = new_staged_upload(&path)?;
             let staging_path = staged_upload_path(&path, &suffix);
+            let mut e_tag = None;
 
             let err = match file.write_all(&bytes) {
-                Ok(_) => match opts.mode {
-                    PutMode::Overwrite => match std::fs::rename(&staging_path, 
&path) {
-                        Ok(_) => None,
-                        Err(source) => Some(Error::UnableToRenameFile { source 
}),
-                    },
-                    PutMode::Create => match std::fs::hard_link(&staging_path, 
&path) {
-                        Ok(_) => {
-                            let _ = std::fs::remove_file(&staging_path); // 
Attempt to cleanup
-                            None
+                Ok(_) => {
+                    let metadata = file.metadata().map_err(|e| Error::Metadata 
{

Review Comment:
   Does this work with blobfuse, the original description suggested the file 
had to be closed before the metadata could be retrieved?



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