You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "SaketaChalamchala (via GitHub)" <gi...@apache.org> on 2023/08/08 00:03:00 UTC

[GitHub] [ozone] SaketaChalamchala commented on a diff in pull request #5153: HDDS-9123. Make S3G MPU invalid part Exception Reporting More detailed

SaketaChalamchala commented on code in PR #5153:
URL: https://github.com/apache/ozone/pull/5153#discussion_r1286477005


##########
hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/ObjectEndpoint.java:
##########
@@ -919,6 +919,11 @@ private Response createMultipartKey(OzoneVolume volume, String bucket,
         throw newError(NO_SUCH_UPLOAD, uploadID, ex);
       } else if (isAccessDenied(ex)) {
         throw newError(S3ErrorTable.ACCESS_DENIED, bucket + "/" + key, ex);
+      } else if ((ex.getResult() == ResultCodes.INVALID_PART)) {
+        OS3Exception os3Exception = S3ErrorTable.newError(

Review Comment:
   Thanks for the patch @xichen01. 
   nit: Use statically imported method `newError` instead of `S3ErrorTable.newError` here to make the code more consistent.
   
   Could you also add Unit Tests for uploading Partitions with invalid partition id?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org