Chung-En Lee created HDDS-17657:
-----------------------------------

             Summary: CompleteMultipartUpload accepts a repeated part number 
when the earlier entry has no ETag
                 Key: HDDS-17657
                 URL: https://issues.apache.org/jira/browse/HDDS-17657
             Project: Apache Ozone
          Issue Type: Sub-task
          Components: S3
            Reporter: Chung-En Lee


Steps to reproduce:
# Create a multipart upload and upload parts 1 and 2 (5 MiB each).
# Send CompleteMultipartUpload with one of these part lists:
** Case 1: {{[{PartNumber: 1}, {PartNumber: 1, ETag: <part 1 ETag>}]}}
** Case 2: {{[{PartNumber: 1}, {PartNumber: 2, ETag: <part 2 ETag>}, 
{PartNumber: 1, ETag: <part 1 ETag>}]}}
# Send HeadObject.

Actual:
* Case 1: CompleteMultipartUpload returns 200, and the object is 5 MiB. Part 2 
is dropped.
* Case 2: CompleteMultipartUpload returns 200, and the object is 10 MiB.

Expected:

Both requests return 400 MalformedXML, as on AWS S3. No object is created, and 
the upload stays open.

Cause:

HDDS-17554 detects a repeat from the return value of partsMap.put in 
ObjectEndpoint#completeMultipartUpload. A missing ETag stores null, so the next 
entry with that part number isn't detected.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to