This is an automated email from the ASF dual-hosted git repository.

scwhittle pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git


The following commit(s) were added to refs/heads/master by this push:
     new 1cf3545e5b7 Fix Dataflow legacy worker abort loop thread death issue 
(#38894)
1cf3545e5b7 is described below

commit 1cf3545e5b7fca560539e7ea7ad29949c1c1190a
Author: Danny McCormick <[email protected]>
AuthorDate: Thu Jun 11 04:46:24 2026 -0400

    Fix Dataflow legacy worker abort loop thread death issue (#38894)
    
    Previously, when the service asked the worker to abort, it threw
    ReadLoopAbortedException, which extends InterruptedException.
    MapTaskExecutor caught this and, in an attempt to preserve the
    interrupted status, set the interrupted bit on the thread.
    However, since this was a logical abort and not a real thread interrupt,
    setting the interrupted bit caused subsequent operations on the thread
    (like the backoff sleep in DataflowBatchWorkerHarness) to immediately
    fail with InterruptedException, leading to all worker threads dying
    and the harness hanging.
    
    This fix changes the interruption handling in MapTaskExecutor to not
    set the interrupted bit if it is just rethrowing the InterruptedException.
    Since we are throwing the exception, we can rely on the caller to
    set the bit if they swallow it and need to preserve it.
    
    Ref: b/512366613
---
 .../runners/dataflow/worker/util/common/worker/MapTaskExecutor.java    | 3 ---
 1 file changed, 3 deletions(-)

diff --git 
a/runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/util/common/worker/MapTaskExecutor.java
 
b/runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/util/common/worker/MapTaskExecutor.java
index 3c33e190406..c6e1ae209b9 100644
--- 
a/runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/util/common/worker/MapTaskExecutor.java
+++ 
b/runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/util/common/worker/MapTaskExecutor.java
@@ -100,9 +100,6 @@ public class MapTaskExecutor implements WorkExecutor {
         } catch (Exception closeExn) {
           exn.addSuppressed(closeExn);
         }
-        if (exn instanceof InterruptedException) {
-          Thread.currentThread().interrupt();
-        }
         throw exn;
       }
     }

Reply via email to