Github user StefanRRichter commented on a diff in the pull request:
https://github.com/apache/flink/pull/6275#discussion_r200737014
--- 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 --
I think that an atomic boolean might be required. This check can pass, then
we get interrupted, meanwhile the stream task might already go into the
shutdown code and the interrupt might slip through?
---