mirror of
https://github.com/minio/minio.git
synced 2025-11-09 21:49:46 -05:00
Ignore file not found error for multipart-uploads (#5065)
Dont print the error errFileNotFound, as it is expected that concurrent complete-multipart-uploads or abort-multipart-uploads would have deleted the file, and the file may not be found Fixes: https://github.com/minio/minio/issues/5056
This commit is contained in:
@@ -744,7 +744,13 @@ func (fs fsObjects) CompleteMultipartUpload(bucket string, object string, upload
|
||||
if removeObjectDir {
|
||||
basePath := pathJoin(fs.fsPath, minioMetaMultipartBucket, bucket)
|
||||
derr := fsDeleteFile(basePath, pathJoin(basePath, object))
|
||||
errorIf(derr, "unable to remove %s in %s", pathJoin(basePath, object), basePath)
|
||||
if derr = errorCause(derr); derr != nil {
|
||||
// In parallel execution, CompleteMultipartUpload could have deleted temporary
|
||||
// state files/directory, it is safe to ignore errFileNotFound
|
||||
if derr != errFileNotFound {
|
||||
errorIf(derr, "unable to remove %s in %s", pathJoin(basePath, object), basePath)
|
||||
}
|
||||
}
|
||||
}
|
||||
objectMPartPathLock.Unlock()
|
||||
}()
|
||||
@@ -979,7 +985,13 @@ func (fs fsObjects) AbortMultipartUpload(bucket, object, uploadID string) error
|
||||
if removeObjectDir {
|
||||
basePath := pathJoin(fs.fsPath, minioMetaMultipartBucket, bucket)
|
||||
derr := fsDeleteFile(basePath, pathJoin(basePath, object))
|
||||
errorIf(derr, "unable to remove %s in %s", pathJoin(basePath, object), basePath)
|
||||
if derr = errorCause(derr); derr != nil {
|
||||
// In parallel execution, AbortMultipartUpload could have deleted temporary
|
||||
// state files/directory, it is safe to ignore errFileNotFound
|
||||
if derr != errFileNotFound {
|
||||
errorIf(derr, "unable to remove %s in %s", pathJoin(basePath, object), basePath)
|
||||
}
|
||||
}
|
||||
}
|
||||
objectMPartPathLock.Unlock()
|
||||
}()
|
||||
|
||||
Reference in New Issue
Block a user