[jira] [Created] (FLINK-6480) Add executor service parameter Snapshotable::snapshot(...)

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (FLINK-6480) Add executor service parameter Snapshotable::snapshot(...)

Shang Yuanchun (Jira)
Stefan Richter created FLINK-6480:
-------------------------------------

             Summary: Add executor service parameter Snapshotable::snapshot(...)
                 Key: FLINK-6480
                 URL: https://issues.apache.org/jira/browse/FLINK-6480
             Project: Flink
          Issue Type: Improvement
          Components: State Backends, Checkpointing
            Reporter: Stefan Richter


We could change the way how async snapshots are executed. Currently, the snapshot method looks like:

{code:java}
RunnableFuture<S> snapshot(
                long checkpointId,
                long timestamp,
                CheckpointStreamFactory streamFactory,
                CheckpointOptions checkpointOptions) throws Exception;
{code}

and I would suggest to change this to:

{code:java}
Future<S> snapshot(
                long checkpointId,
                long timestamp,
                CheckpointStreamFactory streamFactory,
                CheckpointOptions checkpointOptions,
                ExecutorService executor) throws Exception;
{code}

The implication of this change is, that the FutureRunnable can immediately be scheduled to the provided executor service. This makes it easier to reason about the Future's lifecycle and to parallelize multiple snapshot tasks in an operator instance's checkpointing.

The Future's ownership is only transferred once, from the backend to the executor service, so cancelation on shutdown only either happens already in the backend or when the executor service is shut down.





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