curcur commented on a change in pull request #17187:
URL: https://github.com/apache/flink/pull/17187#discussion_r708007068
##########
File path:
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTask.java
##########
@@ -916,11 +931,15 @@ public final void cleanUp(Throwable throwable) throws
Exception {
suppressedException =
runAndSuppressThrowable(this::releaseOutputResources,
suppressedException);
- suppressedException =
- runAndSuppressThrowable(channelIOExecutor::shutdown,
suppressedException);
-
- suppressedException = runAndSuppressThrowable(mailboxProcessor::close,
suppressedException);
+ if (channelIOExecutor != null) {
+ suppressedException =
+ runAndSuppressThrowable(channelIOExecutor::shutdown,
suppressedException);
+ }
Review comment:
I think there are other resources that might be null as well. Not just
`channelIOExecutor` and `mailboxProcessor`
Let's take `releaseOutputResources` for example,
both operatorChain and recordWriter can possibly be null if thrown exception
from the constructor?
--
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]