[ https://issues.apache.org/jira/browse/FLINK-9776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16536637#comment-16536637 ]
ASF GitHub Bot commented on FLINK-9776: --------------------------------------- Github user StefanRRichter commented on a diff in the pull request: https://github.com/apache/flink/pull/6275#discussion_r200911028 --- Diff: flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/Task.java --- @@ -1563,7 +1573,7 @@ public void run() { // log stack trace where the executing thread is stuck and // interrupt the running thread periodically while it is still alive - while (executerThread.isAlive()) { + while (task.shouldInterruptOnCancel() && executerThread.isAlive()) { --- End diff -- Ok, if the intention is improvement and not 100% certainty, then this is perfectly ok. > Interrupt TaskThread only while in User/Operator code > ----------------------------------------------------- > > Key: FLINK-9776 > URL: https://issues.apache.org/jira/browse/FLINK-9776 > Project: Flink > Issue Type: Improvement > Components: Local Runtime > Reporter: Stephan Ewen > Assignee: Stephan Ewen > Priority: Major > Labels: pull-request-available > Fix For: 1.6.0 > > > Upon cancellation, the task thread is periodically interrupted. > This helps to pull the thread out of blocking operations in the user code. > Once the thread leaves the user code, the repeated interrupts may interfere > with the shutdown cleanup logic, causing confusing exceptions. > We should stop sending the periodic interrupts once the thread leaves the > user code. -- This message was sent by Atlassian JIRA (v7.6.3#76005)