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

gracefully shutdown AKKA threads when user error encountered #155

Open
KeranYang opened this issue Nov 6, 2024 · 0 comments
Open

gracefully shutdown AKKA threads when user error encountered #155

KeranYang opened this issue Nov 6, 2024 · 0 comments

Comments

@KeranYang
Copy link
Member

KeranYang commented Nov 6, 2024

Currently we are using System.exit(0)

https://github.com/numaproj/numaflow-java/blob/main/src/main/java/io/numaproj/numaflow/mapper/Server.java#L96

Without System.exit(0) the shutdown will hang because there is lingering AKKA thread. To reproduce the issue, remove System.exit, you can write an error mapper and deploy the pipeline, you can see the mapper container doesn't get restarted immediately. Instead, it wait for numa container health check to determine it's not healthy and then terminate, which takes around 5 minutes to happen.

Another quick way to reproduce is simply to run the mapper/transformer server test from IDE. You can see the test succeeds but not stops. Generate a thread dump and you should see it's AKKA thread hanging.

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

No branches or pull requests

1 participant