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


##########
pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/RealtimeSegmentDataManager.java:
##########
@@ -1619,7 +1620,17 @@ public RealtimeSegmentDataManager(SegmentZKMetadata 
segmentZKMetadata, TableConf
 
     // Acquire semaphore to create stream consumers
     try {
-      _partitionGroupConsumerSemaphore.acquire();
+      while (!_partitionGroupConsumerSemaphore.tryAcquire(5, 
TimeUnit.MINUTES)) {
+        // reload segment metadata to get latest status
+        segmentZKMetadata = 
_realtimeTableDataManager.fetchZKMetadata(_segmentNameStr);
+
+        if (segmentZKMetadata.getStatus() != 
CommonConstants.Segment.Realtime.Status.IN_PROGRESS) {

Review Comment:
   change this check to == Status.DONE
   
   reason being in pauseless, the segment can be in a new COMMITTING state 
where it still doesn't have download url. 



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