Copilot commented on code in PR #17560:
URL: https://github.com/apache/pinot/pull/17560#discussion_r2720471975


##########
pinot-server/src/main/java/org/apache/pinot/server/starter/helix/FreshnessBasedConsumptionStatusChecker.java:
##########
@@ -80,6 +80,14 @@ protected boolean isSegmentCaughtUp(String segmentName, 
RealtimeSegmentDataManag
 
     StreamMetadataProvider streamMetadataProvider =
         
realtimeTableDataManager.getStreamMetadataProvider(rtSegmentDataManager);
+
+    if (!streamMetadataProvider.supportsOffsetLag()) {
+      // Cannot conclude if segment has caught up or not. Skip such segments.
+      _logger.warn("Stream provider for segment: {} does not support offset 
subtraction. Current offset: {}",
+          segmentName, currentOffset);
+      return true;
+    }

Review Comment:
   The comment states 'Cannot conclude if segment has caught up or not' which 
implies uncertainty, but the code returns `true` (indicating the segment is 
caught up). This is misleading. The comment should clarify that returning 
`true` here means the segment is considered healthy/passing the freshness check 
by default for streams that don't support offset lag, not that it has actually 
caught up.



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