Skip to content

fix(watchers): gracefully handle watch disconnection #309

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

Closed
wants to merge 1 commit into from

Conversation

goldmann
Copy link

@goldmann goldmann commented Jan 20, 2021

This shows a possible (but not necessarily elegant) way of cleaning up watcher when the application is shut down. In order to gracefully shut down, the close() method should be called manually. For Quarkus based apps - this is done automatically.

@metacosm metacosm self-requested a review January 20, 2021 08:35
@s-soroosh
Copy link
Contributor

This shows a possible (but not necessarily elegant) way of cleaning up watcher when the application is shut down. In order to gracefully shut down, the close() method should be called manually. For Quarkus based apps - this is done automatically.

For pure-java baed operators we can use java runtime hooks to stop the hooks shutdown, for Spring-based operators we can do a similar thing as what's done already for Quarkus.

One issue might be to distinguish the environment and close the watchers in the corresponding way,
This changeset would help to have platform-dependent changes inside the operator.
#263

@goldmann
Copy link
Author

@s-soroosh Maybe a generic JVM shutdown hook would do a great job for all of the platforms? I guess it's worth a try. I can take a look at this.

@goldmann
Copy link
Author

I'll close this for now.

@goldmann goldmann closed this Mar 14, 2021
@metacosm
Copy link
Collaborator

I'm going to look at this in the context of the new extension as well.

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.

3 participants