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


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/replication/ECUnderReplicationHandler.java:
##########
@@ -153,37 +166,48 @@ public Map<DatanodeDetails, SCMCommand<?>> 
processAndCreateCommands(
         }
       }
       List<Integer> missingIndexes = replicaCount.unavailableIndexes(true);
+      Map<Integer, Pair<ContainerReplica, NodeStatus>> sources =
+              filterSources(replicas, deletionInFlight);
+      List<DatanodeDetails> nodes =
+              sources.values().stream().map(Pair::getLeft)

Review Comment:
   I'm confused about this piece of code, but I may be missing something 
obvious.
   
   There are two filters:
   
   ```
   .filter(datanodeDetails ->
                                 datanodeDetails.getPersistedOpState() ==
                                 HddsProtos.NodeOperationalState.IN_SERVICE)
   ```
   
   And
   
   ```
   .filter(DatanodeDetails::isDecomissioned)
   ```
   Are these not mutually exclusive? Ie, a node cannot be IN_SERVICE and 
isDecommissioned - so will this not filter everything out?
   
   Inside filter sources, we already sort the IN_SERVICE above other states - I 
am wondering why we need to filter again here?



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