GitHub user StephanEwen opened a pull request:
https://github.com/apache/flink/pull/6275
FLINK-9776 [runtime] Stop sending periodic interrupts once executing thread leaves user function / operator code.
-
- What is the purpose of the change
Upon cancellation, the task thread is periodically interrupted. This helps to pull the thread out of blocking operations in the user code.
However, once the thread leaves the user code, the repeated interrupts may interfere with the shutdown cleanup logic, causing confusing exceptions.
This PR changes the behavior to stop sending the periodic interrupts once the thread leaves the user code.
-
- Brief change log
- `AbstractInvokable` maintains a flag whether interrupts should be sent.
- `StreamTask` sets to not receive interrupts after coming out of the user code
-
- Verifying this change
This change is a trivial rework that currently only avoids throwing and catching of InterruptedExceptions that may cause noise in the logs.
-
- Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): *no*
- The public API, i.e., is any changed class annotated with `@Public(Evolving)`: *no*
- The serializers: *no*
- The runtime per-record code paths (performance sensitive): *no*
- Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: *no*
- The S3 file system connector: *no*
-
- Documentation
- Does this pull request introduce a new feature? *no*
- If yes, how is the feature documented? *not applicable*
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/StephanEwen/incubator-flink stop_interrupts
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flink/pull/6275.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #6275
commit 73d31551574f3c18e4cbc079681ed93f9ec2ef34
Author: Stephan Ewen <sewen@...>
Date: 2018-07-06T11:34:27Z
FLINK-9776 [runtime] Stop sending periodic interrupts once executing thread leaves user function / operator code.
GitHub user StephanEwen opened a pull request:
https://github.com/apache/flink/pull/6275
FLINK-9776[runtime] Stop sending periodic interrupts once executing thread leaves user function / operator code.Upon cancellation, the task thread is periodically interrupted. This helps to pull the thread out of blocking operations in the user code.
However, once the thread leaves the user code, the repeated interrupts may interfere with the shutdown cleanup logic, causing confusing exceptions.
This PR changes the behavior to stop sending the periodic interrupts once the thread leaves the user code.
This change is a trivial rework that currently only avoids throwing and catching of InterruptedExceptions that may cause noise in the logs.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/StephanEwen/incubator-flink stop_interrupts
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flink/pull/6275.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #6275
commit 73d31551574f3c18e4cbc079681ed93f9ec2ef34
Author: Stephan Ewen <sewen@...>
Date: 2018-07-06T11:34:27Z
FLINK-9776[runtime] Stop sending periodic interrupts once executing thread leaves user function / operator code.