junkaixue commented on code in PR #2668:
URL: https://github.com/apache/helix/pull/2668#discussion_r1364311182


##########
helix-core/src/main/java/org/apache/helix/controller/stages/IntermediateStateCalcStage.java:
##########
@@ -367,6 +367,9 @@ private PartitionStateMap 
computeIntermediatePartitionState(ResourceControllerDa
           currentStateOutput.getCurrentStateMap(resourceName, 
partition).entrySet().stream()
               .collect(Collectors.toMap(Map.Entry::getKey, 
Map.Entry::getValue));
       List<String> preferenceList = 
preferenceLists.get(partition.getPartitionName());
+      if (preferenceList == null || preferenceList.size() == 0) {
+        continue;

Review Comment:
   We cannot just let continue. That means we are not restricting the 
throttling if preference list is null.
   
   But the problematic code place is the use preference list as a backup 
replica when the number of replica is not parsable. We should pass 0, as 
argument for getRequiredState instead of continuing.



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