mcvsubbu commented on a change in pull request #4990: Enhance TableRebalancer to be able to rebalance table under any condition URL: https://github.com/apache/incubator-pinot/pull/4990#discussion_r368331774
########## File path: pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/rebalance/TableRebalancer.java ########## @@ -175,67 +166,127 @@ public RebalanceResult rebalance(TableConfig tableConfig, Configuration rebalanc if (currentAssignment.equals(targetAssignment)) { LOGGER.info("Table: {} is already balanced", tableNameWithType); if (reassignInstances) { - return new RebalanceResult(RebalanceResult.Status.DONE, "Instance reassigned, table is already balanced", - instancePartitionsMap, targetAssignment); + if (dryRun) { + return new RebalanceResult(RebalanceResult.Status.DONE, + "Instance reassigned in dry-run mode, table is already balanced", instancePartitionsMap, + targetAssignment); + } else { + return new RebalanceResult(RebalanceResult.Status.DONE, "Instance reassigned, table is already balanced", + instancePartitionsMap, targetAssignment); + } } else { return new RebalanceResult(RebalanceResult.Status.NO_OP, "Table is already balanced", instancePartitionsMap, targetAssignment); } } if (dryRun) { - LOGGER.info("Rebalance table: {} in dry-run mode, returning the target assignment", tableNameWithType); + LOGGER.info("Rebalancing table: {} in dry-run mode, returning the target assignment", tableNameWithType); Review comment: ```suggestion LOGGER.info("Rebalancing table {} in dry-run mode, returning the target assignment", tableNameWithType); ``` ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org