Stefan Richter created FLINK-6684:
-------------------------------------

             Summary: Remove AsyncCheckpointRunnable from StreamTask
                 Key: FLINK-6684
                 URL: https://issues.apache.org/jira/browse/FLINK-6684
             Project: Flink
          Issue Type: Improvement
          Components: State Backends, Checkpointing
            Reporter: Stefan Richter


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. 



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

Reply via email to