You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Stephan Ewen (JIRA)" <ji...@apache.org> on 2017/02/08 19:29:41 UTC

[jira] [Commented] (FLINK-5738) Destroy created backend when task is canceled

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

Stephan Ewen commented on FLINK-5738:
-------------------------------------

This is one more issue caused by the fact that the initialization of many fields is "lazy".
The best way to solve this is IMO to make the {{AbstractInvokable}} accept the {{Environment}} in the constructor and initialize all fields eagerly in the constructor.

> Destroy created backend when task is canceled
> ---------------------------------------------
>
>                 Key: FLINK-5738
>                 URL: https://issues.apache.org/jira/browse/FLINK-5738
>             Project: Flink
>          Issue Type: Bug
>          Components: State Backends, Checkpointing
>    Affects Versions: 1.2.0
>            Reporter: Xiaogang Shi
>
> When a task is canceled, the {{ClosableRegistry}} will be closed in the cancel thread. However, the task may still in the creation of {{KeyedStateBackend}}, and it will fail to register the backend to the {{ClosableRegistry}}. Because the backend is not assigned to the operator yet (due to the exception), the backend will not be destroyed when the task thread exits.
> A simple solution is to catch exception in the registering and destroy the created backend in the case of failures. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)