[ 
https://issues.apache.org/jira/browse/HDDS-17554?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gargi Jaiswal reassigned HDDS-17554:
------------------------------------

    Assignee: Gargi Jaiswal

> CompleteMultipartUpload accepts duplicate part numbers and creates an 
> incomplete object
> ---------------------------------------------------------------------------------------
>
>                 Key: HDDS-17554
>                 URL: https://issues.apache.org/jira/browse/HDDS-17554
>             Project: Apache Ozone
>          Issue Type: Bug
>          Components: S3
>            Reporter: Bablu Raul
>            Assignee: Gargi Jaiswal
>            Priority: Major
>
> The Ozone S3 Gateway accepts a {{CompleteMultipartUpload}} request containing 
> duplicate part numbers and successfully completes the upload instead of 
> rejecting the invalid part sequence.
> When completing a multipart upload, the client must provide a valid sequence 
> of part numbers and their corresponding ETags. The gateway should validate 
> the supplied parts before committing the object.
> During testing, two parts of 5 MiB each were uploaded successfully, and 
> {{ListParts}} confirmed that both parts were present. The completion request 
> then specified part number {{1}} twice ({{{}[1,1]{}}}), using the same ETag 
> for both entries.
> The gateway returned a successful response, but the resulting object 
> contained only 5 MiB instead of the expected 10 MiB. {{HeadObject}} reported 
> {{ContentLength: 5242880}} and {{{}PartsCount: 2{}}}, and {{GetObject}} 
> returned only 5 MiB of data.
> This behavior indicates that duplicate part numbers are not properly 
> validated during multipart upload completion, potentially resulting in 
> incomplete objects despite a successful API response.
> h2. Steps to Reproduce
>  # Initiate a multipart upload.
>  # Upload two parts of 5 MiB each using part numbers 1 and 2.
>  # Verify that both parts are present using {{{}ListParts{}}}.
>  # Invoke {{CompleteMultipartUpload}} with the following part list, using the 
> ETag of part 1 for both entries:
> {code:java}
> { "Parts": [ { "ETag": "<part-1-etag>", "PartNumber": 1 }, { "ETag": 
> "<part-1-etag>", "PartNumber": 1 } ] }{code}
>  # Verify the completion response and inspect the object using {{HeadObject}} 
> and {{{}GetObject{}}}.
> h2. Actual Result
> The gateway accepts the duplicate part-number sequence and returns a 
> successful completion response. However, the resulting object is only 5 MiB, 
> although two 5 MiB parts were uploaded.
> {{HeadObject}} reports {{ContentLength: 5242880}} and {{{}PartsCount: 2{}}}, 
> while {{GetObject}} returns only 5,242,880 bytes.
> h2. Expected Result
> The gateway should reject a {{CompleteMultipartUpload}} request containing 
> duplicate part numbers with an appropriate S3 error response instead of 
> successfully completing the upload.
> Valid multipart completion requests with unique, ascending part numbers 
> should continue to work as expected.



--
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