XComp commented on a change in pull request #14686: URL: https://github.com/apache/flink/pull/14686#discussion_r559953578
########## File path: flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/DefaultScheduler.java ########## @@ -270,9 +270,22 @@ private void restartTasksWithDelay(final FailureHandlingResult failureHandlingRe delayExecutor.schedule( () -> FutureUtils.assertNoException( - cancelFuture.thenRunAsync( - restartTasks(executionVertexVersions, globalRecovery), - getMainThreadExecutor())), + cancelFuture + .thenRunAsync( + restartTasks( + executionVertexVersions, globalRecovery), + getMainThreadExecutor()) + .thenRunAsync( + () -> + archiveExceptions( + failureHandlingResult.getError(), + executionVertexVersions.stream() + .map( + ExecutionVertexVersion + ::getExecutionVertexId) + .collect( + Collectors + .toList())))), Review comment: Thanks for the pointer to `priorExecutions`. I missed it out completely. You're saying that instead of caching the `Throwable`s in `SchedulerBase::executionCache` I should use `Execution::priorExecution`?! That makes sense as we avoid saving the same information twice. But I would have to change the `priorCause` to `ErrorInfo` (instead of `Throwable`) to also collect the time when the `Throwable` was caught. Am I right? ---------------------------------------------------------------- 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: us...@infra.apache.org