dawidwys commented on a change in pull request #19198:
URL: https://github.com/apache/flink/pull/19198#discussion_r836205477



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/stopwithsavepoint/StopWithSavepointTerminationHandlerImpl.java
##########
@@ -167,16 +166,13 @@ private void 
handleAnyExecutionNotFinished(Set<ExecutionState> notFinishedExecut
      */
     private void terminateExceptionallyWithGlobalFailover(
             Iterable<ExecutionState> unfinishedExecutionStates, String 
savepointPath) {
-        String errorMessage =
-                String.format(
-                        "Inconsistent execution state after stopping with 
savepoint. At least one execution is still in one of the following states: %s. 
A global fail-over is triggered to recover the job %s.",
-                        StringUtils.join(unfinishedExecutionStates, ", "), 
jobId);
-        FlinkException inconsistentFinalStateException = new 
FlinkException(errorMessage);
+        StopWithSavepointException inconsistentFinalStateException =
+                new StopWithSavepointException(savepointPath, jobId);
 
         log.warn(
-                "A savepoint was created at {} but the corresponding job {} 
didn't terminate successfully.",
-                savepointPath,
-                jobId,
+                "Inconsistent execution state after stopping with savepoint. 
At least one"
+                        + " execution is still in one of the following states: 
{}.",
+                StringUtils.join(unfinishedExecutionStates, ", "),
                 inconsistentFinalStateException);
 
         scheduler.handleGlobalFailure(inconsistentFinalStateException);

Review comment:
       It's done with the annotation on the exception: 
`@ThrowableAnnotation(ThrowableType.NonRecoverableError)`




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to