swaminathanmanish commented on code in PR #19632:
URL: https://github.com/apache/pinot/pull/19632#discussion_r4080108049


##########
pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/RealtimeSegmentDataManager.java:
##########
@@ -1489,6 +1489,26 @@ private void releaseConsumerSemaphore() {
     }
   }
 
+  /// Updates the [ServerGauge#LLC_PARTITION_CONSUMING] gauge when this 
consuming segment stops.
+  ///
+  /// When the partition is retired -- a stream shard that has been 
split/merged and fully consumed, i.e.
+  /// [#_endOfPartitionGroup] is set -- no successor consuming segment is ever 
created for it, so leaving the
+  /// gauge at 0 would make it linger at 0 forever and raise a false-positive 
RealtimeIngestionStopped alert.
+  /// In that case the gauge is removed so the series goes absent. For every 
other stop (a normal commit that
+  /// gets a successor consuming segment, or a hold) the gauge is set to 0 as 
before.
+  private void markConsumingStopped() {
+    if (_endOfPartitionGroup) {
+      _serverMetrics.removeTableGauge(_clientId, 
ServerGauge.LLC_PARTITION_CONSUMING);

Review Comment:
   Good call out. Added a check to ensure segment commit happens to emit the 
metric. 



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