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

Protect initializeState() and open() by the same lock.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.3.0
    • Fix Version/s: 1.3.0
    • Component/s: DataStream API
    • Labels:
      None

      Description

      Currently the initializeState() of all operators in a task is called without the checkpoint lock, and before the open(). This may lead to problematic situations as the following:

      In the case that we retrieve timers from a checkpoint, e.g. WindowOperator and (future) CEP, if we re-register them in the initializeState(), then if they fire before the open() of the downstream operators is called, we will have a task failure, as the downstream channels are not open.

      To avoid this, we can put the initializeState() in the same lock as the open(), and the two operations will happen while being protected by the same lock, which also keeps timers from firing.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                kkl0u Kostas Kloudas
                Reporter:
                kkl0u Kostas Kloudas
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: