timothye-gh commented on code in PR #17749:
URL: https://github.com/apache/pinot/pull/17749#discussion_r2855103256


##########
pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/IngestionDelayTracker.java:
##########
@@ -575,11 +574,11 @@ public long getPartitionEndToEndIngestionDelayMs(int 
partitionId) {
   public long getPartitionIngestionDelayMs(int partitionId) {
     IngestionInfo ingestionInfo = _ingestionInfoMap.get(partitionId);
     long ingestionTimeMs = 0;
-    if ((ingestionInfo != null) && (ingestionInfo._ingestionTimeMs > 0)) {
-      ingestionTimeMs = ingestionInfo._ingestionTimeMs;
+    if (ingestionInfo == null || ingestionInfo._ingestionTimeMs < 0) {
+      return 0;

Review Comment:
   What if we simply don't emit the metric if there is no ingestion info? You 
don't want 0 emitted when it is not explicitly 0, but we don't want 56 years 
emitted. Not emitting in these cases satisfies both requirements. 



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