walterddr commented on code in PR #12336:
URL: https://github.com/apache/pinot/pull/12336#discussion_r1473582032


##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/SegmentStatusChecker.java:
##########
@@ -311,6 +312,9 @@ private void updateSegmentMetrics(String tableNameWithType, 
TableConfig tableCon
           LOGGER.warn("Segment {} of table {} has no online replicas", 
partitionName, tableNameWithType);
         }
         nOffline++;
+      } else if (nReplicas == 1) {

Review Comment:
   should we check if the segment is configured to be single replica in table 
config? 
   If so, i dont think we should emit any metrics (e.g. only emit this when the 
nReplicas is smaller than the expected one)



##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/SegmentStatusChecker.java:
##########
@@ -323,6 +327,8 @@ private void updateSegmentMetrics(String tableNameWithType, 
TableConfig tableCon
     _controllerMetrics.setValueOfTableGauge(tableNameWithType, 
ControllerGauge.PERCENT_OF_REPLICAS,
         (nReplicasIdealMax > 0) ? (nReplicasExternal * 100 / 
nReplicasIdealMax) : 100);
     _controllerMetrics.setValueOfTableGauge(tableNameWithType, 
ControllerGauge.SEGMENTS_IN_ERROR_STATE, nErrors);
+    _controllerMetrics.setValueOfTableGauge(tableNameWithType, 
ControllerGauge.SEGMENTS_WITHOUT_HIGH_AVAILABILITY,
+        nNoHA);

Review Comment:
   i was wondering if we should name: SEGMENTS_WITH_SINGLE_REPLICA 



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