Aitozi commented on a change in pull request #16894:
URL: https://github.com/apache/flink/pull/16894#discussion_r692873064



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/dispatcher/Dispatcher.java
##########
@@ -446,9 +446,13 @@ private CleanupJobState handleJobManagerRunnerResult(
             JobManagerRunnerResult jobManagerRunnerResult, ExecutionType 
executionType) {
         if (jobManagerRunnerResult.isInitializationFailure()) {
             if (executionType == ExecutionType.RECOVERY) {
-                return jobManagerRunnerFailed(
-                        
jobManagerRunnerResult.getExecutionGraphInfo().getJobId(),
-                        jobManagerRunnerResult.getInitializationFailure());
+                if (jobManagerRunnerResult.isJobFinishing()) {
+                    return CleanupJobState.GLOBAL;

Review comment:
       I have implemented this by complete the jobManagerRunner resultFuture 
with 
   
   ```java
   resultFuture.complete(
           JobManagerRunnerResult.forSuccess(
                   new ExecutionGraphInfo(
                           
jobMasterServiceProcessFactory.createArchivedExecutionGraph(
                                   JobStatus.FAILED,
                                   new JobAlreadyDoneException(getJobID())))));
   ```
   
   But, I'm not sure is it right to set state to `JobStatus.FAILED`. We do not 
know the status of job at the time of recovery of an already done job. I think 
we can do these things like :
   
   - Add a special `JobStatus.UNKNOWN` to handle this case
   - Or when the FLIP for 
[FLINK-11813](https://issues.apache.org/jira/browse/FLINK-11813) have been 
introduced , we can extract the job result directly from `JobResultStore`.
   
   Looking forward to your opinion.




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