somandal commented on code in PR #16144:
URL: https://github.com/apache/pinot/pull/16144#discussion_r2167385991
##########
pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotTableRestletResource.java:
##########
@@ -673,6 +673,9 @@ public RebalanceResult rebalance(
@QueryParam("retryInitialDelayInMs") long retryInitialDelayInMs,
@ApiParam(value = "Whether to update segment target tier as part of the
rebalance") @DefaultValue("false")
@QueryParam("updateTargetTier") boolean updateTargetTier,
+ @ApiParam(value = "Disk utilization threshold override used in pre-check
(0.0 to 1.0, e.g., 0.85 for 85%). "
+ + "If not provided, uses the controller's default threshold")
@DefaultValue("-1.0")
Review Comment:
nit: what is the behavior of the controller default? perhaps you should
elaborate on that here so it is clear to users
##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/rebalance/DefaultRebalancePreChecker.java:
##########
@@ -92,17 +92,21 @@ public Map<String, RebalancePreCheckerResult>
check(PreCheckContext preCheckCont
// Check whether minimizeDataMovement is set in TableConfig
preCheckResult.put(IS_MINIMIZE_DATA_MOVEMENT,
checkIsMinimizeDataMovement(tableConfig, rebalanceConfig,
tableRebalanceLogger));
+ // Determine the disk utilization threshold to use - either from rebalance
config override or default
+ double diskUtilizationThreshold =
rebalanceConfig.getDiskUtilizationThreshold() >= 0.0
+ ? rebalanceConfig.getDiskUtilizationThreshold() :
_defaultDiskUtilizationThreshold;
+ // clip the disk utilization threshold to [0.0, 1.0]
+ diskUtilizationThreshold = Math.min(1.0, diskUtilizationThreshold);
Review Comment:
let's log a warning if we clip so users are aware in case they wonder why
the value they provided changed
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]