Github user pnowojski commented on a diff in the pull request: https://github.com/apache/flink/pull/5239#discussion_r159836477 --- Diff: flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/Execution.java --- @@ -145,8 +145,8 @@ private volatile Throwable failureCause; // once assigned, never changes - /** The handle to the state that the task gets on restore */ - private volatile TaskStateSnapshot taskState; + /** Information to restore the task onr recovery, such as checkpoint id and task state snapshot */ + private volatile TaskRestore taskRestore; --- End diff -- I would add `SerializableOptional` class, make this field `SerializableOptional<TaskRestore>` and pass it down to `Task` to avoid nulls. If you do not like this, please at least add `@Nullable` annotations to this field and subsequent usages. Or maybe embed `isEmpty` logic into `TaskRestore`.
---