Github user tillrohrmann commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5437#discussion_r168525466
  
    --- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/dispatcher/MiniDispatcher.java
 ---
    @@ -100,6 +101,18 @@ public MiniDispatcher(
                return acknowledgeCompletableFuture;
        }
     
    +   @Override
    +   public CompletableFuture<JobResult> requestJobResult(JobID jobId, Time 
timeout) {
    +           final CompletableFuture<JobResult> jobResultFuture = 
super.requestJobResult(jobId, timeout);
    +
    +           if (executionMode == ClusterEntrypoint.ExecutionMode.NORMAL) {
    +                   // terminate the MiniDispatcher once we served the 
first JobResult successfully
    +                   jobResultFuture.thenRun(this::shutDown);
    --- End diff --
    
    I think you're right. We should also shut down the `MiniDispatcher` in case 
of a failure.


---

Reply via email to