somandal commented on code in PR #15266: URL: https://github.com/apache/pinot/pull/15266#discussion_r2021935742
########## pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/rebalance/TableRebalancer.java: ########## @@ -632,15 +651,15 @@ private RebalanceSummaryResult calculateDryRunSummary(Map<String, Map<String, St for (Map.Entry<String, Map<String, String>> entrySet : currentAssignment.entrySet()) { existingReplicationFactor = entrySet.getValue().size(); - for (String segmentKey : entrySet.getValue().keySet()) { - existingServersToSegmentMap.computeIfAbsent(segmentKey, k -> new HashSet<>()).add(entrySet.getKey()); + for (String instanceName : entrySet.getValue().keySet()) { + existingServersToSegmentMap.computeIfAbsent(instanceName, k -> new HashSet<>()).add(entrySet.getKey()); } } for (Map.Entry<String, Map<String, String>> entrySet : targetAssignment.entrySet()) { newReplicationFactor = entrySet.getValue().size(); - for (String segmentKey : entrySet.getValue().keySet()) { - newServersToSegmentMap.computeIfAbsent(segmentKey, k -> new HashSet<>()).add(entrySet.getKey()); + for (String instanceName : entrySet.getValue().keySet()) { Review Comment: original name was incorrect, it should be instanceName here. The format is supposed to be: ``` segment1: instance1: ONLINE, instance2: ONLINE, instance3: ONLINE segment2: instance5: ONLINE, instance6: ONLINE, instance7: ONLINE ``` The for-loop is going through the inner instanceToStateMap Just a note that if another PR gets merged before this, that might fix this up and when I rebase I won't need to make this change. -- 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: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org