somandal commented on code in PR #15953:
URL: https://github.com/apache/pinot/pull/15953#discussion_r2116567075
##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/rebalance/DefaultRebalancePreChecker.java:
##########
@@ -343,17 +344,36 @@ private RebalancePreCheckerResult
checkRebalanceConfig(RebalanceConfig rebalance
}
List<String> segmentsToMove =
SegmentAssignmentUtils.getSegmentsToMove(currentAssignment, targetAssignment);
- if (rebalanceConfig.isDowntime()) {
- int numReplicas = Integer.MAX_VALUE;
+ int numReplicas = Integer.MAX_VALUE;
+ if (rebalanceConfig.isDowntime() ||
PauselessConsumptionUtils.isPauselessEnabled(tableConfig)) {
for (String segment : segmentsToMove) {
numReplicas = Math.min(targetAssignment.get(segment).size(),
numReplicas);
}
+ }
+
+ if (rebalanceConfig.isDowntime()) {
if (!segmentsToMove.isEmpty() && numReplicas > 1) {
pass = false;
warnings.add("Number of replicas (" + numReplicas + ") is greater than
1, downtime is not recommended.");
}
}
+ if (PauselessConsumptionUtils.isPauselessEnabled(tableConfig)) {
Review Comment:
nit: let's add a TODO here to revisit if this pre-check should be removed
once improvements are made to rebalance to handle this scenario better, so that
we don't forget to address this
--
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]