You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Till Rohrmann (JIRA)" <ji...@apache.org> on 2017/06/02 13:49:04 UTC

[jira] [Created] (FLINK-6833) Race condition: Asynchronous checkpointing task can fail completed StreamTask

Till Rohrmann created FLINK-6833:
------------------------------------

             Summary: Race condition: Asynchronous checkpointing task can fail completed StreamTask
                 Key: FLINK-6833
                 URL: https://issues.apache.org/jira/browse/FLINK-6833
             Project: Flink
          Issue Type: Bug
          Components: Local Runtime, State Backends, Checkpointing
    Affects Versions: 1.3.0, 1.4.0
            Reporter: Till Rohrmann
            Assignee: Till Rohrmann
            Priority: Critical


A {{StreamTask}} which is about to finish and thus transitioning its containing {{Task}} into the {{ExecutionState.FINISHED}} state, can be failed by a concurrent asynchronous checkpointing operation. The problem is that upon termination the {{StreamTask}} cancels all concurrent operations (amongst others ongoing asynchronous checkpoints). The cancellation of the async checkpoint triggers the {{StreamTask#handleAsyncException}} call which will fail the containing {{Task}}. If the {{handleAsyncException}} completes before the {{StreamTask}} has been properly terminated, then the containing {{Task}} will transition into {{ExecutionState.FAILED}} instead of {{ExecutionState.FINISHED}}.

In order to resolve this race condition, we should check in the {{StreamTask#handleAsyncException}} whether the {{StreamTask}} is still running or has already been terminated. Only in the former case, we should fail the containing {{Task}}.



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