Jackie-Jiang commented on code in PR #13207:
URL: https://github.com/apache/pinot/pull/13207#discussion_r1612444543


##########
pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/IngestionDelayTracker.java:
##########
@@ -314,6 +314,22 @@ public void markPartitionForVerification(int 
partitionGroupId) {
     _partitionsMarkedForVerification.put(partitionGroupId, _clock.millis());
   }
 
+  /*
+   * Method to get timestamp used for the ingestion delay for a given 
partition.
+   *
+   * @param partitionGroupId partition for which we are retrieving the delay
+   *
+   * @return ingestion delay timestamp in milliseconds for the given partition 
ID.
+   */
+  public long getPartitionIngestionTimeMs(int partitionGroupId) {
+    // Not protected as this will only be invoked when metric is installed 
which happens after server ready
+    IngestionTimestamps currentMeasure = 
_partitionToIngestionTimestampsMap.get(partitionGroupId);
+    if (currentMeasure == null) { // Guard just in case we read the metric 
without initializing it
+      return 0;

Review Comment:
   Suggest returning `Long.MIN_VALUE` by default to be aligned with the segment 
metadata



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