zhuzhurk commented on code in PR #22506: URL: https://github.com/apache/flink/pull/22506#discussion_r1195539179
########## flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/failover/flip1/ExecutionFailureHandler.java: ########## @@ -51,22 +57,35 @@ public class ExecutionFailureHandler { /** Number of all restarts happened since this job is submitted. */ private long numberOfRestarts; + private final Context taskFailureCtx; + private final Context globalFailureCtx; Review Comment: IIUC, we we creating two contexts to host different `FailureType`? This does not seems to be very flexible. Later we need to add one more context for `TASK_MANAGER` type, and maybe even more if more types are introduced. Also, like @dmvk mentioned in https://github.com/apache/flink/pull/22506#discussion_r1195408929. We may need to provide more information about the error to the enrichers, e.g. related task. Such information can be decided only after an error occurs. So maybe a more flexible way is to create a new context for each failure dynamically, i.e. create from `failedExecution ` in `handleFailure ()`. It's also fine for me to do it in a follow-up task. -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org