Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IGNITE-23920 Shutdown node on SIGTERM #5010

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

IGNITE-23920 Shutdown node on SIGTERM #5010

wants to merge 1 commit into from

Conversation

Pochatkin
Copy link
Contributor

@Pochatkin Pochatkin requested a review from rpuch January 9, 2025 09:02
AtomicBoolean shutdown = new AtomicBoolean(false);
Runtime.getRuntime().addShutdownHook(new Thread(() -> {
try {
LOG.info("Ignite node shutting down...");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While testing this, I've found that logging via the framework is unreliable, looks like it could already be shut down. I'd use System.out and System.err directly instead of the logger.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants