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

Siyao Meng updated HDDS-17162:
------------------------------
    Status: Patch Available  (was: Open)

> Return INVALID_PART for a non-positive multipart part number in OM create key 
> requests
> --------------------------------------------------------------------------------------
>
>                 Key: HDDS-17162
>                 URL: https://issues.apache.org/jira/browse/HDDS-17162
>             Project: Apache Ozone
>          Issue Type: Bug
>          Components: Ozone Manager
>            Reporter: Siyao Meng
>            Assignee: Siyao Meng
>            Priority: Major
>              Labels: pull-request-available
>
> {{OMKeyRequest.prepareMultipartFileInfo}} validates the multipart part number 
> with {{Preconditions.checkArgument}}, so a CreateKey or CreateFile request 
> for a multipart part with a part number below 1 fails with an 
> {{IllegalArgumentException}} instead of an {{OMException}} with a result code.
> This change:
> * throws {{OMException}} with {{INVALID_PART}} from 
> {{prepareMultipartFileInfo}} when the part number is below 1, so the request 
> fails with a normal error response like other request validation in OM.
> * adds tests to {{TestOMKeyCreateRequest}} and {{TestOMFileCreateRequest}} 
> for part numbers 0 and -1.
> Compatibility:
> * No protocol, version or layout change.
> * The Ozone client and the S3 Gateway already reject part numbers below 1 
> before sending the request, so they see no difference.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to