do not return an error in AbortMultipartUpload() (#18135)

returning an error is a bit undefined in AWS S3
as it may return an error or not depending on the
time from AbortMultipartUpload().
This commit is contained in:
Harshavardhana
2023-09-29 10:28:19 -07:00
committed by GitHub
parent c34bdc33fb
commit d6446cb096
2 changed files with 12 additions and 3 deletions
+5 -1
View File
@@ -1248,7 +1248,11 @@ func (er erasureObjects) CompleteMultipartUpload(ctx context.Context, bucket str
}
}
defer er.deleteAll(context.Background(), minioMetaMultipartBucket, uploadIDPath)
defer func() {
if err == nil {
er.deleteAll(context.Background(), minioMetaMultipartBucket, uploadIDPath)
}
}()
// Rename the multipart object to final location.
onlineDisks, versionsDisparity, err := renameData(ctx, onlineDisks, minioMetaMultipartBucket, uploadIDPath,