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

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

Github user tillrohrmann commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3548#discussion_r106211648
  
    --- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/PendingCheckpoint.java
 ---
    @@ -191,6 +194,22 @@ void setStatsCallback(@Nullable PendingCheckpointStats 
trackerCallback) {
                this.statsCallback = checkNotNull(trackerCallback);
        }
     
    +   /**
    +    * Sets the handle for the canceller to this pending checkoint.
    +    * 
    +    * @return true, if the handle was set, false, if the checkpoint is 
already disposed;
    +    */
    +   public boolean setCancellerHandle(ScheduledFuture<?> cancellerHandle) {
    +           synchronized (lock) {
    +                   if (!discarded) {
    +                           this.cancellerHandle = cancellerHandle;
    --- End diff --
    
    I know this method will only be called once in `CheckpointCoordinator`. 
However, in order to make this class self contained I think it would either be 
good to fail if we have already set an `cancellerHandle` or cancel the old
    canceller to avoid an outdated discard call.


> Cancel checkpoint canceller tasks in CheckpointCoordinator
> ----------------------------------------------------------
>
>                 Key: FLINK-5962
>                 URL: https://issues.apache.org/jira/browse/FLINK-5962
>             Project: Flink
>          Issue Type: Bug
>          Components: State Backends, Checkpointing
>    Affects Versions: 1.2.0, 1.3.0
>            Reporter: Till Rohrmann
>            Assignee: Stephan Ewen
>            Priority: Critical
>
> The {{CheckpointCoordinator}} register a canceller task for each running 
> checkpoint. The canceller task's responsibility is to cancel a checkpoint if 
> it takes too long to complete. We should cancel this task as soon as the 
> checkpoint has been completed, because otherwise we will keep many canceller 
> tasks around. This can eventually lead to an OOM exception.



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

Reply via email to