You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Jiangjie Qin (Jira)" <ji...@apache.org> on 2020/12/10 00:49:00 UTC

[jira] [Commented] (FLINK-20492) The SourceOperatorStreamTask should implement cancelTask() and finishTask()

    [ https://issues.apache.org/jira/browse/FLINK-20492?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17246933#comment-17246933 ] 

Jiangjie Qin commented on FLINK-20492:
--------------------------------------

Per discussion in the [PR|https://github.com/apache/flink/pull/14314]. The correct solution here is closing the {{SourceReader}} in {{SourceOperator.dispose()}} which will be called in all cases.

The PR has been merged:

master: 168124f99c75e873adc81437c700f85f703e2248
release-1.12: c22bb49443e6d70be5d312acee065fc9b4d95bb2

> The SourceOperatorStreamTask should implement cancelTask() and finishTask()
> ---------------------------------------------------------------------------
>
>                 Key: FLINK-20492
>                 URL: https://issues.apache.org/jira/browse/FLINK-20492
>             Project: Flink
>          Issue Type: Bug
>          Components: Connectors / Common
>            Reporter: Jiangjie Qin
>            Assignee: Jiangjie Qin
>            Priority: Blocker
>              Labels: pull-request-available
>             Fix For: 1.13.0, 1.12.1
>
>
> The {{SourceOperatorStreamTask}} does not implement {{cancelTask}} and {{finishTask}} at this point. This causes resource leak on job cancellation of finish.
> Currently there are three cases that a Job may exit.
>  # Canceled - {{cancelTask()}} method will be called to close the SourceOperator.
>  # Stopped with a savepoint - {{finishTask()}} method will be called to close the SourceOperator.
>  # Runs to the EndOfInput -  the SourceOperator is closed in {{StreamTask.afterInvoke()}}.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)