[fix][io] Close the kafka source connector got stuck#20698
[fix][io] Close the kafka source connector got stuck#20698poorbarcode merged 7 commits intoapache:masterfrom
Conversation
| private volatile boolean running = false; | ||
| private KafkaSourceConfig kafkaSourceConfig; | ||
| private Thread runnerThread; | ||
| private final Executor executor = Executors.newSingleThreadExecutor(); |
There was a problem hiding this comment.
It's better to set a thread name for debugging purpose.
There was a problem hiding this comment.
And when the executor will be closed?
There was a problem hiding this comment.
It's better to set a thread name for debugging purpose.
fixed
And when the executor will be closed?
changed it to a static variable
There was a problem hiding this comment.
already remove the executor, and just new one thread if needed
|
We only use this thread once. Maybe we can new a thread and then run the close task? |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #20698 +/- ##
============================================
+ Coverage 72.60% 73.17% +0.56%
- Complexity 32018 32105 +87
============================================
Files 1855 1871 +16
Lines 138569 138964 +395
Branches 15250 15283 +33
============================================
+ Hits 100605 101682 +1077
+ Misses 29945 29239 -706
- Partials 8019 8043 +24
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
The failed OWASP dependency check will be fixed by #20699 |
Motivation: #19880 (comment) When Kafka connector is closing, it waits for the `runnerThread` to stop, but the task-close is running at the same thread, so it will be stuck. Modifications: run `close` in another thread. (cherry picked from commit c5237ea)
Motivation: #19880 (comment) When Kafka connector is closing, it waits for the `runnerThread` to stop, but the task-close is running at the same thread, so it will be stuck. Modifications: run `close` in another thread. (cherry picked from commit c5237ea)
Motivation: #19880 (comment) When Kafka connector is closing, it waits for the `runnerThread` to stop, but the task-close is running at the same thread, so it will be stuck. Modifications: run `close` in another thread.
Motivation: apache#19880 (comment) When Kafka connector is closing, it waits for the `runnerThread` to stop, but the task-close is running at the same thread, so it will be stuck. Modifications: run `close` in another thread. (cherry picked from commit c5237ea) (cherry picked from commit 3a2e593)
Motivation
#19880 (comment) When Kafka connector is closing, it waits for the
runnerThreadto stop, but the task-close is running at the same thread, so it will be stuck.Modifications
run
closein another thread.Documentation
docdoc-requireddoc-not-neededdoc-completeMatching PR in forked repository
PR in forked repository: x