You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2022/04/18 14:59:59 UTC

[GitHub] [ozone] ArafatKhan2198 commented on a diff in pull request #3302: HDDS-6529. Adding Unit-Test cases for S3-Gateway Object-Endpoint Metrics

ArafatKhan2198 commented on code in PR #3302:
URL: https://github.com/apache/ozone/pull/3302#discussion_r852177684


##########
hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/ObjectEndpoint.java:
##########
@@ -230,6 +230,14 @@ public Response put(
       }
       LOG.error("Exception occurred in PutObject", ex);
       throw ex;
+    } catch (OS3Exception ex) {
+      if (copyHeader != null) {
+        getMetrics().incCopyObjectFailure();
+      } else {
+        LOG.error("Exception occurred in PutObject", ex.getMessage());

Review Comment:
   Thanks for pointing that out, we should be logging the error outside the if-else block so as to notify the user that the create key method has failed because an S3 exception was thrown !!
   



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