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