[
https://issues.apache.org/jira/browse/FLINK-18276?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Xintong Song updated FLINK-18276:
---------------------------------
Fix Version/s: (was: 1.11.3)
1.11.4
> NullPointerException (and potential leak) when closing KafkaConsumer after
> exception in reassignPartitions
> ----------------------------------------------------------------------------------------------------------
>
> Key: FLINK-18276
> URL: https://issues.apache.org/jira/browse/FLINK-18276
> Project: Flink
> Issue Type: Bug
> Components: Connectors / Kafka
> Affects Versions: 1.8.3, 1.9.3, 1.10.1, 1.11.0
> Reporter: Nico Kruber
> Priority: Major
> Fix For: 1.12.0, 1.10.3, 1.11.4
>
>
> {code}
> WARN org.apache.flink.streaming.connectors.kafka.internal.KafkaFetcher -
> Error while closing Kafka consumer
> java.lang.NullPointerException
> at
> org.apache.flink.streaming.connectors.kafka.internal.KafkaConsumerThread.run(KafkaConsumerThread.java:282)
> {code}
> {{KafkaConsumerThread#reassignPartitions}} is temporarily setting
> {{consumer}} to {{null}} and if there is an exception (in this case, it was a
> timeout), the {{finally}} block in {{KafkaConsumerThread.run}} would fail
> with an NPE. Even more so, {{KafkaConsumerThread#reassignPartitions}} put the
> original consumer into {{consumerTmp}} which is not closed now and may leak
> underlying (Kafka) resources.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)