valepakh commented on code in PR #5010:
URL: https://github.com/apache/ignite-3/pull/5010#discussion_r1908476360
##########
modules/runner/src/main/java/org/apache/ignite/internal/app/IgniteRunner.java:
##########
@@ -68,14 +73,27 @@ public static IgniteServer start(String... args) {
* @param args CLI args to start a new node.
*/
public static void main(String[] args) {
+ IgniteServer server = start(args);
+ AtomicBoolean shutdown = new AtomicBoolean(false);
+ Runtime.getRuntime().addShutdownHook(new Thread(() -> {
+ try {
+ LOG.info("Ignite node shutting down...");
Review Comment:
Also should we try to use `jdk.internal.misc.Signal#handle` instead of the
shutdown hook? The order of hooks execution is not defined and Micronaut also
registers a hook so it's impossible to do a really clean shutdown when only the
`IgniteServer.shutdown` is called.
--
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]