From 876970baea146896738c8d97bb62f0040fdc2dcb Mon Sep 17 00:00:00 2001 From: Anis Elleuch Date: Sat, 16 Jul 2022 21:25:58 +0100 Subject: [PATCH] Exclude upload-ids with incomplete part upload in multipart listing (#15318) Uploading a part object can leave an inconsistent state inside .minio.sys/multipart where data are uploaded but xl.meta is not committed yet. Do not list upload-ids that have this state in the multipart listing. --- cmd/erasure-multipart.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmd/erasure-multipart.go b/cmd/erasure-multipart.go index 258d010c6..3d537fa4d 100644 --- a/cmd/erasure-multipart.go +++ b/cmd/erasure-multipart.go @@ -237,7 +237,11 @@ func (er erasureObjects) ListMultipartUploads(ctx context.Context, bucket, objec } fi, err := disk.ReadVersion(ctx, minioMetaMultipartBucket, pathJoin(er.getUploadIDDir(bucket, object, uploadID)), "", false) if err != nil { - return result, toObjectErr(err, bucket, object, uploadID) + if !IsErrIgnored(err, errFileNotFound, errDiskNotFound) { + logger.LogIf(ctx, err) + } + // Ignore this invalid upload-id since we are listing here + continue } populatedUploadIds.Add(uploadID) uploads = append(uploads, MultipartInfo{