junkaixue commented on code in PR #2760:
URL: https://github.com/apache/helix/pull/2760#discussion_r1534628807
##########
helix-core/src/main/java/org/apache/helix/controller/rebalancer/waged/constraints/TopStateMaxCapacityUsageInstanceConstraint.java:
##########
@@ -39,6 +41,14 @@ protected double getAssignmentScore(AssignableNode node,
AssignableReplica repli
// So return zero on any assignable node candidate.
return 0;
}
+
+ // No node or replica capacity defined, we default to just looking at #
top state
+ if (node.getMaxCapacity().isEmpty() && replica.getCapacity().isEmpty()) {
+ int curTopPartitionCountForResource =
node.getAssignedTopStatePartitionsCount();
+ int estimatedMaxTopStateCount =
clusterContext.getEstimatedMaxTopStateCount();
+ return computeUtilizationScore(estimatedMaxTopStateCount,
curTopPartitionCountForResource);
+ }
Review Comment:
Yeah. I think my second point get the answer. But still we should not make
top state evenness into capacity constraint. Logically it is not clear.
Would be good to have a separate constraints to hold it.
--
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]