[fix][test] final shutdown executor when the class(PerformanceProducer) is destroyed#19926
Conversation
tisonkun
left a comment
There was a problem hiding this comment.
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.
Just inline or private static?
There was a problem hiding this comment.
Just inline or
private static?
private static, I have updated,thanks @tisonkun
There was a problem hiding this comment.
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
tisonkun
left a comment
There was a problem hiding this comment.
@StevenLuMT Here is a dangling question. I don't think it's a blocker but could you please give it an answer?
finished |
tisonkun
left a comment
There was a problem hiding this comment.
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 |
tisonkun
left a comment
There was a problem hiding this comment.
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?
docdoc-requireddoc-not-neededdoc-completeMatching PR in forked repository
PR in forked repository: StevenLuMT#7