mxm commented on a change in pull request #11394: [FLINK-16573] Ensure Kinesis 
RecordFetcher threads shutdown on cancel
URL: https://github.com/apache/flink/pull/11394#discussion_r391885104
 
 

 ##########
 File path: 
flink-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/util/RecordEmitter.java
 ##########
 @@ -205,6 +205,10 @@ protected void emitRecords() {
                                                }
                                        }
                                }
+                               if (!running) {
 
 Review comment:
   There is no connection between this thread and the task thread. Interrupts 
on the task thread by Flink won't interrupt the fetcher thread. This change is 
sufficient to stop it. 
   
   Generally, it would be smart if Flink itself interrupted not the thread but 
the thread group of the Flink task. Since all spawned threads are by default in 
the parent thread group this would automatically interrupt all of them.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to