zentol commented on code in PR #23440:
URL: https://github.com/apache/flink/pull/23440#discussion_r1535180696


##########
flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/adaptive/StateWithExecutionGraph.java:
##########
@@ -389,7 +389,10 @@ CompletableFuture<CoordinationResponse> 
deliverCoordinationRequestToCoordinator(
     @Override
     public void handleGlobalFailure(
             Throwable cause, CompletableFuture<Map<String, String>> 
failureLabels) {
-        failureCollection.add(ExceptionHistoryEntry.createGlobal(cause, 
failureLabels));
+        // Ignore Global failures when restarting to avoid messing up the 
failure history
+        if (this.getJob().getState() != JobStatus.RESTARTING) {

Review Comment:
   Override `handleGlobalFailure` in `Restarting` instead.



##########
flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/exceptionhistory/RootExceptionHistoryEntry.java:
##########
@@ -104,7 +104,7 @@ public static RootExceptionHistoryEntry 
fromExceptionHistoryEntry(
                 entry.getException(),
                 entry.getTimestamp(),
                 entry.getFailureLabelsFuture(),
-                null,
+                entry.getFailingTaskName(),

Review Comment:
   seems unrelated?



##########
flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/adaptive/StateWithExecutionGraph.java:
##########
@@ -389,7 +389,10 @@ CompletableFuture<CoordinationResponse> 
deliverCoordinationRequestToCoordinator(
     @Override
     public void handleGlobalFailure(
             Throwable cause, CompletableFuture<Map<String, String>> 
failureLabels) {
-        failureCollection.add(ExceptionHistoryEntry.createGlobal(cause, 
failureLabels));
+        // Ignore Global failures when restarting to avoid messing up the 
failure history
+        if (this.getJob().getState() != JobStatus.RESTARTING) {

Review Comment:
   While less common this problem can also occur for `Canceling` and `Failing`.



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