pnowojski commented on a change in pull request #10387: [FLINK-14949]
[Runtime/Task] Task cancellation can be stuck against out-of-thread error
URL: https://github.com/apache/flink/pull/10387#discussion_r353041782
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/Task.java
##########
@@ -989,6 +989,20 @@ public void failExternally(Throwable cause) {
}
private void cancelOrFailAndCancelInvokable(ExecutionState targetState,
Throwable cause) {
+ try {
+ cancelOrFailAndCancelInvokableInternal(targetState,
cause);
+ } catch (Throwable t) {
+ if (ExceptionUtils.isJvmFatalOrOutOfMemoryError(t)) {
+ notifyFatalError(String.format("%s (%s) with
state %s ran into fatal error on cancellation.",
+ taskNameWithSubtask, executionId,
targetState), t);
Review comment:
nit: according to your code style, if you wrap one parameter, you should
also wrap all of them.
Maybe extract `String.format(...)` call to a local variable?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services