akalash commented on a change in pull request #19281:
URL: https://github.com/apache/flink/pull/19281#discussion_r838535433



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/adaptive/StopWithSavepoint.java
##########
@@ -146,7 +147,16 @@ public JobStatus getJobStatus() {
     @Override
     void onFailure(Throwable cause) {
         operationFailureCause = cause;
-        FailureResultUtil.restartOrFail(context.howToHandleFailure(cause), 
context, this);
+        if (savepoint == null) {
+            FailureResultUtil.restartOrFail(context.howToHandleFailure(cause), 
context, this);
+        } else {
+            // savepoint has been create successfully, but the job failed 
while committing side
+            // effects
+            final StopWithSavepointStoppingException ex =
+                    new StopWithSavepointStoppingException(savepoint, 
this.getJobId());

Review comment:
       Why we don't pass the original exception `cause` to 
`StopWithSavepointStoppingException` as the cause? As I see 
`FailureResultUtil.restartOrFail` prints information about exceptions in the 
log and I think it will be valuable information for understanding the problem 
rather than just `StopWithSavepointStoppingException`.

##########
File path: 
flink-tests/src/test/java/org/apache/flink/test/checkpointing/SavepointITCase.java
##########
@@ -342,7 +341,9 @@ public void testStopWithSavepointFailsOverToSavepoint() 
throws Throwable {
                                     && throwable
                                             .getMessage()
                                             .startsWith("A savepoint has been 
created at: "));
-            assertThat(client.getJobStatus(jobGraph.getJobID()).get(), 
is(JobStatus.FAILED));
+            assertThat(
+                    client.getJobStatus(jobGraph.getJobID()).get(),
+                    either(is(JobStatus.FAILED)).or(is(JobStatus.FAILING)));

Review comment:
       I don't really get how your changes influence the job status? Or is it 
the existing problem and even without your changes, both statuses are possible?




-- 
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