KKcorps commented on code in PR #14074:
URL: https://github.com/apache/pinot/pull/14074#discussion_r1775055929


##########
pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/IngestionDelayTracker.java:
##########
@@ -351,6 +398,28 @@ public void timeoutInactivePartitions() {
     }
   }
 
+  /**
+   * Updates the latest offsets for each partition at a configurable frequency 
to reduce load.
+   */
+  private void updateLatestOffsets() {
+    if (!_isServerReadyToServeQueries.get() || 
_realTimeTableDataManager.isShutDown()) {
+      return;
+    }
+    for (Map.Entry<Integer, IngestionInfo> entry : 
_ingestionInfoMap.entrySet()) {
+      int partitionId = entry.getKey();
+      IngestionInfo ingestionInfo = entry.getValue();
+      Supplier<StreamPartitionMsgOffset> latestOffsetFetcher = 
ingestionInfo._latestOffsetFetcher;
+      if (latestOffsetFetcher != null) {

Review Comment:
   Actually it is null in some tests, hence the check



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