xyuanlu commented on code in PR #2969: URL: https://github.com/apache/helix/pull/2969#discussion_r1866737066
########## helix-core/src/main/java/org/apache/helix/controller/stages/CurrentStateComputationStage.java: ########## @@ -364,7 +369,9 @@ void handleResourceCapacityCalculation(ClusterEvent event, ResourceControllerDat .filter(entry -> WagedValidationUtil.isWagedEnabled(cache.getIdealState(entry.getKey()))) .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); + // Ensure instance capacity is null if there are no WAGED enabled instances if (wagedEnabledResourceMap.isEmpty()) { + cache.setWagedCapacityProviders(null, null); Review Comment: how about having a function 'clearWagedCapacityProviders()'? -- 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: reviews-unsubscr...@helix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@helix.apache.org For additional commands, e-mail: reviews-h...@helix.apache.org