tillrohrmann commented on a change in pull request #7020: [FLINK-10774] [Kafka] 
connection leak when partition discovery is disabled an…
URL: https://github.com/apache/flink/pull/7020#discussion_r246073731
 
 

 ##########
 File path: 
flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaConsumerBase.java
 ##########
 @@ -732,9 +745,7 @@ public void run() {
                                throw new RuntimeException(discoveryLoopError);
                        }
                } else {
-                       // won't be using the discoverer
-                       partitionDiscoverer.close();
-
+                       // partitionDiscoverer is already closed in open method
 
 Review comment:
   I think it would also be a good idea to wrap the 
`kafkaFetcher.runFetchLoop()` in a `try-finally` block and to call 
`partitionDisoverer.close()` in the `finally` block.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to