-
Notifications
You must be signed in to change notification settings - Fork 73
prevent threads leaking #1325
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
prevent threads leaking #1325
Conversation
Qodana Community for JVMIt seems all right 👌 No new problems were found according to the checks applied 💡 Qodana analysis was run in the pull request mode: only the changed files were checked View the detailed Qodana reportTo be able to view the detailed Qodana report, you can either:
To get - name: 'Qodana Scan'
uses: JetBrains/[email protected]
with:
upload-result: trueContact Qodana teamContact us at [email protected]
|
0efa17b to
89f7453
Compare
| this.nodeExecutorService.shutdownNow(); | ||
| } | ||
| } catch (InterruptedException e) { | ||
| // do nothing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to call this.nodeExecutorService.shutdownNow(); here if the awaitTemrmination request is interrupted
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's another final block in run() method that can catch InterruptedException and handle it.
89f7453 to
88f3120
Compare
88f3120 to
7df7774
Compare
7df7774 to
9533dae
Compare
| this.stop.set(true); | ||
| this.shutdownNodeExecutorService(); | ||
|
|
||
| final Connection conn = this.monitoringConnection.get(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sergiyvamz would it be better to use getAndSet ? in a few places you are splitting get and set on atomic in this class...
Summary
Use ExecutorService to manage node monitoring threads
#1321
Additional Reviewers
@karenc-bq
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.