[
https://issues.apache.org/jira/browse/FLINK-40602?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ASF GitHub Bot updated FLINK-40602:
-----------------------------------
Labels: pull-request-available (was: )
> JobManager silently omits running jobs whose JobMaster fails or times out on
> GET /jobs/overview
> -----------------------------------------------------------------------------------------------
>
> Key: FLINK-40602
> URL: https://issues.apache.org/jira/browse/FLINK-40602
> Project: Flink
> Issue Type: Bug
> Components: Runtime / Coordination
> Affects Versions: 2.3.0, 2.2.1, 2.1.3
> Reporter: Han You
> Priority: Major
> Labels: pull-request-available
>
> JobManager's GET /jobs/overview endpoint fans out a query to every registered
> JobManagerRunner and collects the results with
>
> {code:java}
> queryFunction.apply(job).handle((T value, Throwable t) ->
> Optional.ofNullable(value));{code}
> [https://github.com/apache/flink/blob/master/flink-runtime/src/main/java/org/apache/flink/runtime/dispatcher/Dispatcher.java#L2498-L2500]
> As a result, any throwable is discarded, and the job is simply omitted from
> the GET /jobs/overview endpoint. The endpoint still returns a 200
> regardless.There is no log line and nothing in the response indicating the
> list is partial.
> Any client that uses /jobs/overview to check whether a job still exists --
> most notably the Flink Kubernetes Operator which was the reason I started to
> investigate -- would wrongfully conclude that the job is gone. In the
> operator, this causes wrong internal state and resubmission of duplicated
> jobs.
> I will attach reproduction unit test in the Github PR.
> The expected behavior is to fail when ANY JobMaster query fails.
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)