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_r246385319
 
 

 ##########
 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:
   It wouldn't change the existing behaviour except for the case where 
`kafkaFetcher.runFetchLoop` throws an exception where we don't close the 
`partitionDiscoverer` in line 721 atm. If the `kafkaFetcher` fails, then it 
shouldn't matter whether the `discoveryLoopThread` also fails or not, right?

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