[ 
https://issues.apache.org/jira/browse/FLINK-5667?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15843015#comment-15843015
 ] 

ASF GitHub Bot commented on FLINK-5667:
---------------------------------------

GitHub user tillrohrmann opened a pull request:

    https://github.com/apache/flink/pull/3227

    [backport] [FLINK-5667] [state] Synchronize asynchronous checkpointing and 
close operation

    Backport of #3226 onto `release-1.2` branch.
    
    This PR synchronizes asynchronous checkpointing and close operations of a 
StreamTask.
    The synchronization prevents that an acknowledged checkpoint gets discarded 
and that
    a discarded checkpoint gets acknowledged. It achieves this by introducing 
an atomic
    state variable which guards against late close and acknowledge operations.
    
    cc @uce, @StefanRRichter 


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/tillrohrmann/flink 
asyncCheckpointingFixBackport

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/3227.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #3227
    
----
commit d0a2499f10060f159ad92500338125850a82c0c4
Author: Till Rohrmann <[email protected]>
Date:   2017-01-27T15:26:22Z

    [FLINK-5667] [state] Synchronize asynchronous checkpointing and close 
operation
    
    This PR synchronizes asynchronous checkpointing and close operations of a 
StreamTask.
    The synchronization prevents that an acknowledged checkpoint gets discarded 
and that
    a discarded checkpoint gets acknowledged. It achieves this by introducing 
an atomic
    state variable which guards against late close and acknowledge operations.

----


> Possible state data loss when task fails while checkpointing
> ------------------------------------------------------------
>
>                 Key: FLINK-5667
>                 URL: https://issues.apache.org/jira/browse/FLINK-5667
>             Project: Flink
>          Issue Type: Bug
>          Components: State Backends, Checkpointing
>    Affects Versions: 1.2.0, 1.3.0
>            Reporter: Till Rohrmann
>            Assignee: Till Rohrmann
>            Priority: Blocker
>             Fix For: 1.2.0, 1.3.0
>
>
> It is possible that Flink loses state data when a {{Task}} fails while a 
> checkpoint is being drawn. The scenario is the following:
> Flink has finished the synchronous checkpointing part and starts the 
> asynchronous part by creating and submitting a {{AsyncCheckpointRunnable}} to 
> an {{Executor}}. This runnable is also registered at the closeable registry. 
> If the {{Task}} now fails before the {{AsyncCheckpointRunnable}} has 
> completed, it will be closed due to being registered in the closeable 
> registry. The closing operation will discard all state handles and cancel all 
> runnable state futures. However, it will not stop the runnable from sending 
> an acknowledge message to the {{CheckpointCoordinator}}.
> If this message completes the pending checkpoint, then this checkpoint will 
> be transformed into a {{CompletedCheckpoint}} which is faulty (some of the 
> data has already been deleted). Depending on Flink's configuration, this will 
> discard older completed checkpoints and thus we will have state data loss.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to