wangyang0918 commented on a change in pull request #15396:
URL: https://github.com/apache/flink/pull/15396#discussion_r605462814
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/entrypoint/ClusterEntrypoint.java
##########
@@ -579,6 +580,19 @@ protected static Configuration loadConfiguration(
public static void runClusterEntrypoint(ClusterEntrypoint
clusterEntrypoint) {
+ // Register the signal handler so that we could have the chance to
execute the shutdown
+ // supplier before handling the signal.
+ SignalHandler.register(
+ LOG,
+ () -> {
+ if (clusterEntrypoint.isShutDown.get()) {
+ LOG.info("Waiting for concurrent shutDownAsync
finished.");
+ return
clusterEntrypoint.terminationFuture.thenAccept(ignored -> {});
+ } else {
+ return FutureUtils.completedVoidFuture();
+ }
+ });
Review comment:
Yeah. What I means is `closeAsync()` needs to return the
`terminationFuture` if there was a concurrent `shutDownAsync` already in
progress.
I am just saying current `clusterEntrypoint.closeAsync()` not work.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]