RobinLin666 commented on code in PR #5094:
URL: https://github.com/apache/arrow-rs/pull/5094#discussion_r1398372598
##########
object_store/src/local.rs:
##########
@@ -341,10 +341,13 @@ impl ObjectStore for LocalFileSystem {
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::Overwrite => {
+ std::mem::drop(file);
+ 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) {
Review Comment:
Yes, blobfuse,s3fs and goofys all don't support hard link. But they can
choose `override` mode.
--
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]