sodonnel commented on code in PR #3806:
URL: https://github.com/apache/ozone/pull/3806#discussion_r993617132


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/ContainerReportHandler.java:
##########
@@ -187,7 +188,11 @@ public void onMessage(final ContainerReportFromDatanode 
reportFromDatanode,
             // This is a new Container not in the nodeManager -> dn map yet
             nodeManager.addContainer(datanodeDetails, cid);
           }
-          processSingleReplica(datanodeDetails, container, replica, publisher);
+          if (container == null || ContainerReportValidator
+                  .validate(container, replica)) {
+            processSingleReplica(datanodeDetails, container,

Review Comment:
   As this is an exceptional case, we need to log something if the container 
fails validated, ideally with the source DN, container ID, the invalid replica 
index etc. Otherwise we are just dropping the containers silently, which could 
make things hard to debug.



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