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

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

tillrohrmann commented on a change in pull request #7064: [FLINK-10753] Improve 
propagation and logging of snapshot exceptions
URL: https://github.com/apache/flink/pull/7064#discussion_r232468462
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/PendingCheckpoint.java
 ##########
 @@ -433,25 +434,26 @@ public void abortSubsumed() {
                }
        }
 
+
        public void abortDeclined() {
-               try {
-                       Exception cause = new Exception("Checkpoint was 
declined (tasks not ready)");
-                       onCompletionPromise.completeExceptionally(cause);
-                       reportFailedCheckpoint(cause);
-               } finally {
-                       dispose(true);
-               }
+               abortWithCause(new Exception("Checkpoint was declined (tasks 
not ready)"));
        }
 
        /**
         * Aborts the pending checkpoint due to an error.
         * @param cause The error's exception.
         */
-       public void abortError(Throwable cause) {
+       public void abortError(@Nullable Throwable cause) {
 
 Review comment:
   In which situation can `cause` be `null`?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Propagate and log snapshotting exceptions
> -----------------------------------------
>
>                 Key: FLINK-10753
>                 URL: https://issues.apache.org/jira/browse/FLINK-10753
>             Project: Flink
>          Issue Type: Bug
>          Components: State Backends, Checkpointing
>    Affects Versions: 1.6.2, 1.7.0
>            Reporter: Alexander Fedulov
>            Assignee: Stefan Richter
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.7.0
>
>         Attachments: Screen Shot 2018-11-01 at 16.27.01.png
>
>
> Upon failure, {{AbstractStreamOperator.snapshotState}} rethrows a new 
> exception with the message "{{Could not complete snapshot {} for operator 
> {}.}}" and the original exception as the cause. 
> While handling the error, {{CheckpointCoordinator.discardCheckpoint}} method 
> logs only this  propagated message and not the original cause of the 
> exception.
> In addition, {{pendingCheckpoint.abortDeclined()}}, called from the 
> {{discardCheckpoint}}, reports the failed checkpoint with a misleading 
> message "{{Checkpoint was declined (tasks not ready)}}". This message is what 
> will be displayed in the UI (see attached).
>  Proposition:
>  # Log exception at the Task Manager (.snapshotState)
>  # Log cause, instead of cause.getMessage() at the JobsManager 
> (.dicardCheckpoint)
>  # Pass root cause to abortDeclined and propagate a more appropriate message 
> to the UI.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to