mirror of
https://github.com/minio/minio.git
synced 2024-12-24 06:05:55 -05:00
Ignored errors in cleanup in commitXLMetadata (#2044)
Deletion of tmp files where xl metadata was saved before the commit operation doesn't change the error returned to the caller. So, it is to be ignored.
This commit is contained in:
parent
64899e5197
commit
285a94d2c0
@ -279,18 +279,15 @@ func (xl xlObjects) commitXLMetadata(srcPrefix, dstPrefix string) error {
|
||||
// Rename `xl.json` in a routine.
|
||||
go func(index int, disk StorageAPI) {
|
||||
defer wg.Done()
|
||||
// Delete any dangling directories.
|
||||
defer disk.DeleteFile(minioMetaBucket, srcPrefix)
|
||||
|
||||
// Renames `xl.json` from source prefix to destination prefix.
|
||||
rErr := disk.RenameFile(minioMetaBucket, srcJSONFile, minioMetaBucket, dstJSONFile)
|
||||
if rErr != nil {
|
||||
mErrs[index] = rErr
|
||||
return
|
||||
}
|
||||
// Delete any dangling directories.
|
||||
dErr := disk.DeleteFile(minioMetaBucket, srcPrefix)
|
||||
if dErr != nil {
|
||||
mErrs[index] = dErr
|
||||
return
|
||||
}
|
||||
mErrs[index] = nil
|
||||
}(index, disk)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user