You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Danny Cranmer (Jira)" <ji...@apache.org> on 2022/09/20 15:43:00 UTC
[jira] [Comment Edited] (FLINK-29324) Calling Kinesis connector close method before subtask starts running results in NPE
[ https://issues.apache.org/jira/browse/FLINK-29324?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17607267#comment-17607267 ]
Danny Cranmer edited comment on FLINK-29324 at 9/20/22 3:42 PM:
----------------------------------------------------------------
Merged commit [{{71fea9a}}|https://github.com/apache/flink/commit/71fea9a4522505a6c0f23f1de599b7f87a633ccf] into master.
Merged commit [{{22086c}}|https://github.com/apache/flink/commit/22086c67a6a97148eb74ed32b281eec393721738] into release-1.16
was (Author: dannycranmer):
Merged commit [{{71fea9a}}|https://github.com/apache/flink/commit/71fea9a4522505a6c0f23f1de599b7f87a633ccf] into master
> Calling Kinesis connector close method before subtask starts running results in NPE
> -----------------------------------------------------------------------------------
>
> Key: FLINK-29324
> URL: https://issues.apache.org/jira/browse/FLINK-29324
> Project: Flink
> Issue Type: Bug
> Components: Connectors / Kinesis
> Affects Versions: 1.14.5, 1.15.2
> Reporter: Anthony Pounds-Cornish
> Assignee: Dongming.Hu
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.17.0
>
>
> When a Flink application is stopped before a Kinesis connector subtask has been started, the following exception is thrown:
> {noformat}
> java.lang.NullPointerException
> at org.apache.flink.streaming.connectors.kinesis.FlinkKinesisConsumer.close(FlinkKinesisConsumer.java:421)
> ...{noformat}
> This appears to be related to the fact that [fetcher creation|https://github.com/apache/flink/blob/master/flink-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/FlinkKinesisConsumer.java#L307] may not occur by [the time it is referenced when the consumer is closed|https://github.com/apache/flink/blob/master/flink-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/FlinkKinesisConsumer.java#L421].
> A suggested fix is to make the {{close()}} method null safe [as it has been in the {{cancel()}} method|https://github.com/apache/flink/blob/master/flink-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/FlinkKinesisConsumer.java#L407].
--
This message was sent by Atlassian Jira
(v8.20.10#820010)