klsince commented on code in PR #15029: URL: https://github.com/apache/pinot/pull/15029#discussion_r1953229112
########## pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/rebalance/TableRebalancer.java: ########## @@ -186,13 +190,21 @@ private RebalanceResult doRebalance(TableConfig tableConfig, RebalanceConfig reb && RoutingConfig.STRICT_REPLICA_GROUP_INSTANCE_SELECTOR_TYPE.equalsIgnoreCase( tableConfig.getRoutingConfig().getInstanceSelectorType()); LOGGER.info( - "Start rebalancing table: {} with dryRun: {}, reassignInstances: {}, includeConsuming: {}, bootstrap: {}, " - + "downtime: {}, minReplicasToKeepUpForNoDowntime: {}, enableStrictReplicaGroup: {}, lowDiskMode: {}, " - + "bestEfforts: {}, externalViewCheckIntervalInMs: {}, externalViewStabilizationTimeoutInMs: {}", - tableNameWithType, dryRun, reassignInstances, includeConsuming, bootstrap, downtime, + "Start rebalancing table: {} with dryRun: {}, preChecks: {}, reassignInstances: {}, includeConsuming: {}, " + + "bootstrap: {}, downtime: {}, minReplicasToKeepUpForNoDowntime: {}, enableStrictReplicaGroup: {}, " + + "lowDiskMode: {}, bestEfforts: {}, externalViewCheckIntervalInMs: {}, " + + "externalViewStabilizationTimeoutInMs: {}", + tableNameWithType, dryRun, preChecks, reassignInstances, includeConsuming, bootstrap, downtime, minReplicasToKeepUpForNoDowntime, enableStrictReplicaGroup, lowDiskMode, bestEfforts, externalViewCheckIntervalInMs, externalViewStabilizationTimeoutInMs); + // Perform pre-checks if enabled + Map<String, String> preChecksResult = null; + if (preChecks && _pinotHelixResourceManager != null) { Review Comment: looks like _pinotHelixResourceManager is passed into rebalancer only to get the prechecker object and then pass it to the prechecker's check method? If so, we may let prechecker hold a ref of _pinotHelixResourceManager and just pass prechecker object to rebalancer. -- 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