sajjad-moradi commented on code in PR #16657:
URL: https://github.com/apache/pinot/pull/16657#discussion_r2299363716


##########
pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/RealtimeTableDataManager.java:
##########
@@ -335,6 +335,18 @@ public void onConsumingToDropped(String segmentName) {
     _ingestionDelayTracker.stopTrackingPartitionIngestionDelay(new 
LLCSegmentName(segmentName).getPartitionGroupId());
   }
 
+  /**
+   * Method to handle CONSUMING -> OFFLINE segment state transitions:
+   * We must stop tracking partitions for ingestion-delay if consuming segment 
is marked as offline as there won't be
+   * any consumer present on the server for the partition segment is consuming 
from.
+   *
+   * @param segmentName name of segment which is transitioning state.
+   */
+  @Override
+  public void onConsumingToOffline(String segmentName) {
+    _ingestionDelayTracker.stopTrackingPartitionIngestionDelay(new 
LLCSegmentName(segmentName).getPartitionGroupId());
+  }
+

Review Comment:
   Can you include the comments I made for queries in this PR: 
https://github.com/apache/pinot/pull/16684
   Also let's use segment name instead of partition id to ensure the 
_segmentsToIgnore is updated.
   
   ```java
   /**
      * Method to handle CONSUMING -> OFFLINE segment state transitions:
      * We stop tracking partitions whose segments are going OFFLINE. The 
reason is that offline segments are not queried.
      * So ingestion delay for the offline replicas are not relevant. If there 
are more replicas with offline state,
      * replica up metric will determine the severity of the issue.
      *
      * @param segmentName name of segment for which the state change is being 
handled
      */
     @Override
     public void onConsumingToOffline(String segmentName) {
       _ingestionDelayTracker.stopTrackingPartitionIngestionDelay(segmentName);
     }



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