XComp commented on code in PR #23424: URL: https://github.com/apache/flink/pull/23424#discussion_r1345865694
########## flink-runtime/src/main/java/org/apache/flink/runtime/entrypoint/ClusterEntrypoint.java: ########## @@ -498,12 +498,15 @@ protected CompletableFuture<Void> stopClusterServices(boolean cleanupHaData) { } if (haServices != null) { - try { - if (cleanupHaData) { - haServices.closeAndCleanupAllData(); - } else { - haServices.close(); + if (cleanupHaData) { Review Comment: Initially, I thought that it would be nicer code afterwards by just removing the if/else. But you're right with having separate try/catch blocks as well (which unfortunately, makes the code less readable). We could introduce a default implementation `HighAvailabilityServices#closeWithOptionalClean(boolean)` that does this optional cleanup while closing the services. That would remove the redundant code from `MiniCluster` and `ClusterEntrypoint`. -- 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-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org