-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[fix][test] final shutdown executor when the class(PerformanceProducer) is destroyed #19926
Conversation
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.
Can you elaborate a bit why we need to explicitly shutdown the executor? If the process exits, all tasks just halted.
executorShutdownNow(); | ||
} | ||
|
||
static void executorShutdownNow() { |
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.
Just inline or private static
?
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.
Just inline or
private static
?
private static, I have updated,thanks @tisonkun
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.
Can you elaborate a bit why we need to explicitly shutdown the executor? If the process exits, all tasks just halted.
I think it's more elegant to actively close, control the shutdown wait time,
If the main thread exits, the thread may run incomplete @tisonkun
91b5709
to
1318bfe
Compare
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.
@StevenLuMT Here is a dangling question. I don't think it's a blocker but could you please give it an answer?
finished |
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.
Thanks for your explanation! SGTM.
@StevenLuMT it seems test failed steadily. Please check locally:
|
…roducer) is destroyed
1318bfe
to
388281d
Compare
/pulsarbot run-failure-checks |
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.
Thanks for your contribution @StevenLuMT!
Merging...
Motivation
When the class(PerformanceProducer) destroy, shutdown the executor
Modifications
final shutdown executor when the class(PerformanceProducer) is destroyed
Verifying this change
This change is a trivial rework / code cleanup without any test coverage.
Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
Documentation
Check the box below or label this PR directly.
Need to update docs?
doc
doc-required
doc-not-needed
doc-complete
Matching PR in forked repository
PR in forked repository: StevenLuMT#7