somandal commented on code in PR #15617: URL: https://github.com/apache/pinot/pull/15617#discussion_r2078477653
########## pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/rebalance/TableRebalancer.java: ########## @@ -224,6 +225,9 @@ private RebalanceResult doRebalance(TableConfig tableConfig, RebalanceConfig reb int minReplicasToKeepUpForNoDowntime = rebalanceConfig.getMinAvailableReplicas(); boolean lowDiskMode = rebalanceConfig.isLowDiskMode(); boolean bestEfforts = rebalanceConfig.isBestEfforts(); + int batchSizePerServer = rebalanceConfig.getBatchSizePerServer(); + Preconditions.checkState(batchSizePerServer != 0 && batchSizePerServer >= -1, + "TableRebalance batchSizePerServer must be > 0 or -1 to disable"); Review Comment: not, when we first enter the loop, the serverToNumSegmentsAddedSoFar.etOrDefault(server, 0) for the server will be 0. So we add at least 1 segment and the rebalance moves forward. I have tested with batchSizePerServer=1 let me know if i misunderstood your question though -- 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