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/10/12 15:32:39 UTC

[GitHub] [ozone] sodonnel commented on a diff in pull request #3806: HDDS-7291. Fixing exception handling in case of non positive replica index

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