pinot-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-pinot] jackjlli commented on a change in pull request #5039: Close Kafka consumer before building or downloading immutable segment
Date Wed, 05 Feb 2020 22:26:41 GMT
jackjlli commented on a change in pull request #5039: Close Kafka consumer before building
or downloading immutable segment
URL: https://github.com/apache/incubator-pinot/pull/5039#discussion_r375543320
 
 

 ##########
 File path: pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/LLRealtimeSegmentDataManager.java
 ##########
 @@ -1106,6 +1130,15 @@ public LLRealtimeSegmentDataManager(RealtimeSegmentZKMetadata segmentZKMetadata,
 
     // Create record transformer
     _recordTransformer = CompositeTransformer.getDefaultTransformer(schema);
+
+    // Acquire semaphore to create Kafka consumers
+    try {
+      _partitionIdSemaphore.acquire();
+    } catch (InterruptedException e) {
+      String errorMsg = "InterruptedException when acquiring semaphore for Segment: " + _segmentNameStr;
+      segmentLogger.error(errorMsg);
 
 Review comment:
   It should be ok, since it just logs an error message before the process gets fully shutdown.
Plus, this logic is in the constructor, the segment hasn't been fully instantiated yet.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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


Mime
View raw message