pkuwm commented on a change in pull request #1464:
URL: https://github.com/apache/helix/pull/1464#discussion_r504139865
##########
File path:
helix-core/src/main/java/org/apache/helix/controller/stages/CurrentStateComputationStage.java
##########
@@ -283,10 +284,10 @@ private void
reportInstanceCapacityMetrics(ClusterStatusMonitor clusterStatusMon
asyncExecute(dataProvider.getAsyncTasksThreadPool(), () -> {
try {
// ResourceToRebalance map also has resources from current states.
- // Only use the resources in ideal states to parse all replicas.
+ // Only use the resources in ideal states that enable WAGED to parse
all replicas.
Map<String, IdealState> idealStateMap = dataProvider.getIdealStates();
Map<String, Resource> resourceToMonitorMap =
resourceMap.entrySet().stream()
- .filter(idealStateMap::containsKey)
+ .filter(entry ->
WagedValidationUtil.isWagedEnabled(idealStateMap.get(entry.getKey())))
Review comment:
Ideally, we would report every resource. But currently for those non
WAGED resources, validation won't pass and `HelixException` would be thrown. So
we'll skip non WAGED resources here.
FYI, did a quick search, no other places are found. We should be good now.
----------------------------------------------------------------
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]