You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "siddhantsangwan (via GitHub)" <gi...@apache.org> on 2023/07/18 10:29:40 UTC

[GitHub] [ozone] siddhantsangwan commented on a diff in pull request #5080: HDDS-9019. ECUnderReplicationHandler rejects a potential target if it doesn't satisfy placement policy

siddhantsangwan commented on code in PR #5080:
URL: https://github.com/apache/ozone/pull/5080#discussion_r1266577725


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/replication/ECUnderReplicationHandler.java:
##########
@@ -334,8 +335,19 @@ private int processMissingIndexes(
       if (targetCount < expectedTargetCount) {
         missingIndexes.subList(targetCount, expectedTargetCount).clear();
       }
-      if (0 < targetCount &&
-          validatePlacement(availableSourceNodes, selectedDatanodes)) {
+
+      ContainerPlacementStatus placementStatusWithSelectedTargets =
+          validatePlacement(container, availableSourceNodes, selectedDatanodes);
+      if (!placementStatusWithSelectedTargets.isPolicySatisfied()) {
+        LOG.debug("Target nodes + existing nodes for EC container {}" +
+                " will not satisfy placement policy {}. Reason: {}. Selected" +
+                " nodes: {}. Available source nodes: {}. Resuming " +
+                "reconstruction regardless.",
+            container.containerID(), containerPlacement.getClass().getName(),
+            placementStatusWithSelectedTargets.misReplicatedReason(),
+            selectedDatanodes, availableSourceNodes);
+      }

Review Comment:
   Good point... actually I had thought about this. I decided to let the caller of `validatePlacement()` control what it wants to do with the returned `ContainerPlacementStatus`. In this case that's logging "... Resuming reconstruction regardless."



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