XComp commented on pull request #15311:
URL: https://github.com/apache/flink/pull/15311#issuecomment-810012588


   Might writing down the previous comment got me thinking again: Ideally, we 
would want to have this null check since a failure should always have a cause. 
We didn't introduce a null check so far because of 
[FLINK-21376](https://issues.apache.org/jira/browse/FLINK-21376). There is 
[ErrorInfo. 
createErrorInfoWithNullableCause](https://github.com/apache/flink/blob/c77a686c195d1742c276f4a9e75899c8b85377bb/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ErrorInfo.java#L50)
 for handling this. But it feels to be handled in the wrong place. Instead, we 
should substitute the `null` value by the `FlinkException` in 
[TaskExecutionState's 
constructor](https://github.com/apache/flink/blob/7f1853d3258c38b24e4be36adcfe08a59f211f39/flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/TaskExecutionState.java#L68).
 This way, we make sure that the `null` never ends up in the 
`ExecutionGraph`-related code which enables us to make the invariants stricter 
on our end.


-- 
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]


Reply via email to