Jackie-Jiang commented on code in PR #16437:
URL: https://github.com/apache/pinot/pull/16437#discussion_r2240499974


##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/SegmentStatusChecker.java:
##########
@@ -366,9 +366,16 @@ private void updateSegmentMetrics(String 
tableNameWithType, TableConfig tableCon
           for (Map.Entry<String, String> entry : stateMap.entrySet()) {
             String serverInstanceId = entry.getKey();
             String segmentState = entry.getValue();
-            if ((segmentState.equals(SegmentStateModel.ONLINE) || 
segmentState.equals(SegmentStateModel.CONSUMING))
-                && 
isServerQueryable(serverQueryInfoFetcher.getServerQueryInfo(serverInstanceId))) 
{
-              numEVReplicasUp++;
+            if 
(isServerQueryable(serverQueryInfoFetcher.getServerQueryInfo(serverInstanceId)))
 {

Review Comment:
   Do the segment state check first because in most cases we don't need to read 
the server query info



-- 
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]

Reply via email to