priyeshkaratha commented on code in PR #8251:
URL: https://github.com/apache/ozone/pull/8251#discussion_r2037195161


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/SCMClientProtocolServer.java:
##########
@@ -382,10 +411,14 @@ public List<ContainerWithPipeline> 
getExistContainerWithPipelinesInBatch(
         ContainerWithPipeline cp = getContainerWithPipelineCommon(containerID);
         cpList.add(cp);
       } catch (IOException ex) {
-        //not found , just go ahead
-        LOG.error("Container with common pipeline not found: {}", ex);
+        AUDIT.logReadFailure(buildAuditMessageForFailure(
+            SCMAction.GET_EXIST_CONTAINER_WITH_PIPELINE_BATCH,
+            Collections.singletonMap("containerID", 
String.valueOf(containerID)), ex));

Review Comment:
   Since auditing is done inside a loop and we're not stopping on exceptions, 
we need to initialize a separate audit map here, apart from the one used for 
successful cases. Handled in other place as per your recommendation.



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