Chris Johnson created FLINK-41833:
-------------------------------------
Summary: createSparseArchivedExecutionGraph leaves the terminal
state timestamp at 0 for jobs without a throwable
Key: FLINK-41833
URL: https://issues.apache.org/jira/browse/FLINK-41833
Project: Flink
Issue Type: Bug
Components: Runtime / Coordination
Reporter: Chris Johnson
{{createSparseArchivedExecutionGraph()}} sets the terminal state's timestamp
only when a throwable is given, or when the job is globally terminal and
{{endTimestamp}} is valid ({{{}>= 0{}}}). With the {{{}AdaptiveScheduler{}}},
cancelling a job that has no {{ExecutionGraph}} yet (for example while in
{{{}WaitingForResources{}}}) goes through
{{{}StateWithoutExecutionGraph.cancel() -> getArchivedExecutionGraph(CANCELED,
null){}}}, which passes no throwable and {{{}endTimestamp -1{}}}. The resulting
ArchivedExecutionGraph has {{getState() == CANCELED}} but
{{{}getStatusTimestamp(CANCELED) == 0{}}}, so consumers such as the history
server and REST job details see an invalid end time.
Proposed fix: for a terminal state with no throwable and no valid endTimestamp,
use {{{}System.currentTimeMillis(){}}}, as the failure path already does.
Nonterminal states ({{{}INITIALIZING{}}}, {{{}CANCELLING{}}}) are unchanged.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)