You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2020/10/06 18:53:13 UTC

[GitHub] [druid] abhishekagarwal87 commented on a change in pull request #10467: Fix bug in TimedShutoffInputSourceReader where a timeout does not close all registered closeable

abhishekagarwal87 commented on a change in pull request #10467:
URL: https://github.com/apache/druid/pull/10467#discussion_r500524612



##########
File path: extensions-core/kafka-indexing-service/src/main/java/org/apache/druid/indexing/kafka/KafkaRecordSupplier.java
##########
@@ -174,7 +174,7 @@ public Long getPosition(StreamPartition<Integer> partition)
   }
 
   @Override
-  public void close()
+  public synchronized void close()

Review comment:
       Usually Kafka consumer is closed via `wakeup` method which is thread-safe and can be called concurrently with the other methods in KafkaConsumer. If one thread is busy in `poll` and another thread tries to `close`, it will likely result in an exception. 
   




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



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