jasperjiaguo commented on code in PR #14536:
URL: https://github.com/apache/pinot/pull/14536#discussion_r1872436974


##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/SegmentStatusChecker.java:
##########
@@ -330,46 +336,49 @@ private void updateSegmentMetrics(String 
tableNameWithType, TableConfig tableCon
         }
       }
 
-      int numEVReplicas = 0;
+      int numEVReplicasUp = 0;
       if (externalView != null) {
         Map<String, String> stateMap = externalView.getStateMap(segment);
         if (stateMap != null) {
           for (Map.Entry<String, String> entry : stateMap.entrySet()) {
-            String state = entry.getValue();
-            if (state.equals(SegmentStateModel.ONLINE) || 
state.equals(SegmentStateModel.CONSUMING)) {
-              numEVReplicas++;
+            String serverInstanceId = entry.getKey();
+            String segmentState = entry.getValue();
+            if 
(isServerQueryable(serverQueryInfoFetcher.getServerQueryInfo(serverInstanceId))

Review Comment:
   (totally optional) maybe encapsulate this in the serverQueryInfoFetcher as 
well



-- 
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: commits-unsubscr...@pinot.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to