Gargi-jais11 commented on code in PR #9710:
URL: https://github.com/apache/ozone/pull/9710#discussion_r2767270015


##########
hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/ObjectEndpoint.java:
##########
@@ -503,32 +507,19 @@ public Response get(
           responseBuilder.header(entry.getKey(), headerValue);
         }
       }
+
       addLastModifiedDate(responseBuilder, keyDetails);
       addTagCountIfAny(responseBuilder, keyDetails);
-      long metadataLatencyNs =
-          getMetrics().updateGetKeyMetadataStats(startNanos);
+
+      long metadataLatencyNs = 
getMetrics().updateGetKeyMetadataStats(startNanos);
       perf.appendMetaLatencyNanos(metadataLatencyNs);
+
       return responseBuilder.build();
-    } catch (OMException ex) {
-      auditReadFailure(s3GAction, ex);
-      if (taggingMarker != null) {
-        getMetrics().updateGetObjectTaggingFailureStats(startNanos);
-      } else if (uploadId != null) {
-        getMetrics().updateListPartsFailureStats(startNanos);
-      } else {
+
+    } catch (IOException | RuntimeException ex) {
+      if (uploadId == null) {

Review Comment:
   I think you missed this part.
   When `uploadId != null` and an exception occurs, the code doesn't update 
`listPartsFailureStats`. The catch block only updates `getKeyFailureStats` when 
`uploadId == null`
   



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to