Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-6833

Race condition: Asynchronous checkpointing task can fail completed StreamTask

    XMLWordPrintableJSON

Details

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              trohrmann Till Rohrmann
              trohrmann Till Rohrmann
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: