Commit 1cf3545
authored
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/5123666131 parent 8051efc commit 1cf3545
1 file changed
Lines changed: 0 additions & 3 deletions
File tree
- runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/util/common/worker
Lines changed: 0 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | 103 | | |
107 | 104 | | |
108 | 105 | | |
| |||
0 commit comments