pnowojski opened a new pull request #17253:
URL: https://github.com/apache/flink/pull/17253
[FLINK-24182][task] Allow tasks to cleanly cancel without any interruptions
As long as clean cancellation doesn't take too long time we should allow
tasks
to cleanly cancel, without any interruptions. Otherwise interruptions
could
leave operators/tasks in an illegal state that could potential prevent
interrupted
operator from properly releasing all of the resources.
This change changes cancellation protocol so that interrupt doesn't
happen
immediatelly, but after some delay (half of the JVM fatal error timeout)
[FLINK-24182][task] Do not interrupt tasks/operators that are already closing
Otherwise if we interrupt operator that is doing a blocking call to
release
some resources in closing, we can cause those resources to leak. A good
example
is Kafka sink, which wants to abort transactions in close() method
## Verifying this change
This change adds a couple of new tests to cover for the new behaviour.
## Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): (yes / **no**)
- The public API, i.e., is any changed class annotated with
`@Public(Evolving)`: (yes / **no**)
- The serializers: (yes / **no** / don't know)
- The runtime per-record code paths (performance sensitive): (yes / **no**
/ don't know)
- Anything that affects deployment or recovery: JobManager (and its
components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (yes / **no** / don't
know)
- The S3 file system connector: (yes / **no** / don't know)
## Documentation
- Does this pull request introduce a new feature? (yes / **no**)
- If yes, how is the feature documented? (not applicable / docs /
**JavaDocs** / not documented)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]