verify part.N exists before reading part.N.meta (#20383)

if part.N doesn't exist we do not have to complete
the multipart transaction, it simply means that we
have some partial upload situation at hand.
This commit is contained in:
Harshavardhana
2024-09-05 13:37:19 -07:00
committed by GitHub
parent 6be88a2b99
commit 85f08d7752
2 changed files with 23 additions and 6 deletions

View File

@@ -1106,7 +1106,7 @@ func (er erasureObjects) CompleteMultipartUpload(ctx context.Context, bucket str
readQuorum := fi.ReadQuorum(er.defaultRQuorum())
// Read Part info for all parts
partPath := pathJoin(uploadIDPath, fi.DataDir) + "/"
partPath := pathJoin(uploadIDPath, fi.DataDir) + SlashSeparator
partMetaPaths := make([]string, len(parts))
partNumbers := make([]int, len(parts))
for idx, part := range parts {