jackjlli commented on a change in pull request #8441: URL: https://github.com/apache/pinot/pull/8441#discussion_r840819278
########## File path: pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/assignment/instance/InstanceTagPoolSelector.java ########## @@ -121,12 +190,40 @@ public InstanceTagPoolSelector(InstanceTagPoolConfig tagPoolConfig, String table LOGGER.info("Selecting pools: {} for table: {}", poolsToSelect, _tableNameWithType); pools.retainAll(poolsToSelect); } else { - // Non-pool based selection + // Non-pool based selection. All the instances should be associated with a single pool, which is always 0. + // E.g.: Pool0 -> [ I1, I2, I3, I4, I5, I6 ] - LOGGER.info("Selecting {} instances for table: {}", numCandidateInstances, _tableNameWithType); + LOGGER.info("Selecting {} instances for table: {}", candidateInstanceConfigsMap.size(), _tableNameWithType); // Put all instance configs as pool 0 - poolToInstanceConfigsMap.put(0, candidateInstanceConfigs); + + for (Map.Entry<Integer, List<String>> entry : existingPoolToInstancesMap.entrySet()) { Review comment: If the existing pool doesn't have any instances any more, we shouldn't add it to the candidate list. -- 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