narendly commented on a change in pull request #413: Add cluster level default instance config. URL: https://github.com/apache/helix/pull/413#discussion_r314771903
########## File path: helix-core/src/main/java/org/apache/helix/controller/rebalancer/waged/model/AssignableNode.java ########## @@ -88,11 +88,15 @@ private void refresh(ClusterConfig clusterConfig, InstanceConfig instanceConfig, Collection<AssignableReplica> existingAssignment) { reset(); - _currentCapacity.putAll(instanceConfig.getInstanceCapacityMap()); + Map<String, Integer> instanceCapaity = instanceConfig.getInstanceCapacityMap(); Review comment: Do: ``` _maxCapacity = instanceConfig.getInstanceCapacityMap(); if (_maxCapacity != null && _maxCapacity.isEmpty()) { _maxCapacity = clusterConfig.getDefaultInstanceCapacityMap(); } .. _currentCapacity.putAll(_maxCapacity); ``` Also, do we want to recompute currentCapacity from scratch every rebalance? We certainly could for an MVP but just making sure (this optimization could come later). ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@helix.apache.org For additional commands, e-mail: reviews-h...@helix.apache.org