nicoweidner commented on a change in pull request #17762:
URL: https://github.com/apache/flink/pull/17762#discussion_r748362194



##########
File path: 
flink-clients/src/main/java/org/apache/flink/client/deployment/application/ApplicationDispatcherBootstrap.java
##########
@@ -165,7 +170,9 @@ public void stop() {
                                 if (applicationStatus == 
ApplicationStatus.CANCELED
                                         || applicationStatus == 
ApplicationStatus.FAILED) {
                                     LOG.info("Application {}: ", 
applicationStatus, t);
-                                    return 
dispatcherGateway.shutDownCluster(applicationStatus);
+                                    return shouldShutDownOnFinish
+                                            ? 
dispatcherGateway.shutDownCluster(applicationStatus)
+                                            : 
CompletableFuture.completedFuture(Acknowledge.get());
                                 }
                             }
 

Review comment:
       Ah, good point. I didn't change the logic in this branch because no 
shutdown was triggered in this class before the change. I suppose that shutdown 
is triggered in some other way if the future completes exceptionally (which is 
still the case since `thenCompose` does not handle the exception, as you 
observed)
   
   I tend to think that we want to keep the cluster alive even in case of 
unexpected failures. Do you think this could cause problems?




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