You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "dmvk (via GitHub)" <gi...@apache.org> on 2023/05/25 11:06:12 UTC

[GitHub] [flink] dmvk commented on a diff in pull request #22587: [FLINK-31892][runtime] Introduce AdaptiveScheduler global failure enrichment/labeling

dmvk commented on code in PR #22587:
URL: https://github.com/apache/flink/pull/22587#discussion_r1205354415


##########
flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/adaptive/StopWithSavepoint.java:
##########
@@ -253,7 +254,8 @@ void onGloballyTerminalState(JobStatus globallyTerminalState) {
         } else {
             handleGlobalFailure(
                     new FlinkException(
-                            "Job did not reach the FINISHED state while performing stop-with-savepoint."));
+                            "Job did not reach the FINISHED state while performing stop-with-savepoint."),
+                    FailureEnricherUtils.EMPTY_FAILURE_LABELS);

Review Comment:
   We should pass this trough scheduler to give labeling a chance
   
   ```diff
   diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/adaptive/StopWithSavepoint.java b/flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/adaptive/StopWithSavepoint.java
   index 19acf2fd210..5d7d0b4486a 100644
   --- a/flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/adaptive/StopWithSavepoint.java
   +++ b/flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/adaptive/StopWithSavepoint.java
   @@ -25,6 +25,7 @@ import org.apache.flink.runtime.executiongraph.ArchivedExecutionGraph;
    import org.apache.flink.runtime.executiongraph.ExecutionGraph;
    import org.apache.flink.runtime.failure.FailureEnricherUtils;
    import org.apache.flink.runtime.scheduler.ExecutionGraphHandler;
   +import org.apache.flink.runtime.scheduler.GlobalFailureHandler;
    import org.apache.flink.runtime.scheduler.OperatorCoordinatorHandler;
    import org.apache.flink.runtime.scheduler.exceptionhistory.ExceptionHistoryEntry;
    import org.apache.flink.runtime.scheduler.stopwithsavepoint.StopWithSavepointStoppingException;
   @@ -252,10 +253,9 @@ class StopWithSavepoint extends StateWithExecutionGraph {
                                    return null;
                                }));
            } else {
   -            handleGlobalFailure(
   +            context.handleGlobalFailure(
                        new FlinkException(
   -                            "Job did not reach the FINISHED state while performing stop-with-savepoint."),
   -                    FailureEnricherUtils.EMPTY_FAILURE_LABELS);
   +                            "Job did not reach the FINISHED state while performing stop-with-savepoint."));
            }
        }
    
   @@ -273,7 +273,8 @@ class StopWithSavepoint extends StateWithExecutionGraph {
                        StateTransitions.ToCancelling,
                        StateTransitions.ToExecuting,
                        StateTransitions.ToFailing,
   -                    StateTransitions.ToRestarting {
   +                    StateTransitions.ToRestarting,
   +                    GlobalFailureHandler {
    
            /**
             * Asks how to handle the failure.
   ```



-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org