xl/fs: Make i/o operations atomic. (#1496)
This commit is contained in:
committed by
Anand Babu (AB) Periasamy
parent
17868ccd7f
commit
5133ea50bd
@@ -174,6 +174,9 @@ func putObjectCommon(storage StorageAPI, bucket string, object string, size int6
|
||||
}
|
||||
err = fileWriter.Close()
|
||||
if err != nil {
|
||||
if clErr := safeCloseAndRemove(fileWriter); clErr != nil {
|
||||
return "", clErr
|
||||
}
|
||||
return "", err
|
||||
}
|
||||
err = storage.RenameFile(minioMetaBucket, tempObj, bucket, object)
|
||||
|
||||
Reference in New Issue
Block a user