mcvsubbu commented on code in PR #9244:
URL: https://github.com/apache/pinot/pull/9244#discussion_r956364550


##########
pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/LLRealtimeSegmentDataManager.java:
##########
@@ -1429,15 +1429,17 @@ private void setConsumeEndTime(SegmentZKMetadata 
segmentZKMetadata, long now) {
     }
   }
 
-  private void fetchLatestStreamOffset() {
-    try (StreamMetadataProvider metadataProvider = _streamConsumerFactory
-        .createPartitionMetadataProvider(_clientId, _partitionGroupId)) {
-      _latestStreamOffsetAtStartupTime =
-          
metadataProvider.fetchStreamPartitionOffset(OffsetCriteria.LARGEST_OFFSET_CRITERIA,
 /*maxWaitTimeMs*/5000);
+  public StreamPartitionMsgOffset fetchLatestStreamOffset() {
+    long maxWaitTimeMs = 5000;

Review Comment:
   I am not worried about the minimal change afterwards. We have turned what 
was a private method in a class an changed it to a public method. At the 
minimum, the javadoc could indicate that there is 5s wait. At best, take a 
timeout parameter so that any other class that calls it does it knowingly.
   
   What we don't want is another class calling this method without knowing that 
there could be a 5s delay and get surprised when there is



-- 
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: commits-unsubscr...@pinot.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to