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

Remove AsyncCheckpointRunnable from StreamTask

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Invalid
    • None
    • None
    • None

    Description

      Right now, StreamTask executes AsyncCheckpointRunnable to run the async part of a snapshot. However, it seems that currently the main reason for executing this code in a separate tread is to avoid its execution under the checkpoint lock, so that processing can proceed.

      Actually, the checkpoint is already triggered asynchronously, in Task::triggerCheckpointBarrier. We could also execute the checkpointing without executing AsyncCheckpointRunnable, by just running the code inside the thread that is spawned in Task::triggerCheckpointBarrier. We could simply

      1) Run the synchronous part of the checkpoint under the checkpointing lock.
      2) Run the asynchronous part of the checkpoint without holding the checkpointing lock.
      3) Returning a Future from StatefulTask::triggerCheckpoint when called from Task::triggerCheckpointBarrier.

      This would simplify the code and make the usage of the SafetyNetCloseableRegistry possible as intended.

      Attachments

        Activity

          People

            phoenixjiangnan Bowen Li
            srichter Stefan Richter
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: