[ 
https://issues.apache.org/jira/browse/FLINK-11843?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16813582#comment-16813582
 ] 

Till Rohrmann commented on FLINK-11843:
---------------------------------------

The problem actually not only occurs if the termination of the 
{{JobManagerRunner}} but also if the startup of a {{JobManagerRunner}} takes 
too long (e.g. if the state restore from ZooKeeper takes longer due to 
connection problems). The effect is the same: Due to the blocking nature of the 
{{JobManagerRunner}} instantiation we do execute it in a separate thread. After 
the creation has completed we splice the execution back into the main thread by 
using the {{MainThreadExecutor}} in order to update the internal {{Dispatcher}} 
fields. If the executor has been invalidated in the meantime, then it will 
never be executed and {{Dispatcher#recoveryOperation}} will never get completed.

> Dispatcher fails to recover jobs if leader change happens during 
> JobManagerRunner termination
> ---------------------------------------------------------------------------------------------
>
>                 Key: FLINK-11843
>                 URL: https://issues.apache.org/jira/browse/FLINK-11843
>             Project: Flink
>          Issue Type: Bug
>          Components: Runtime / Coordination
>    Affects Versions: 1.7.2, 1.8.0
>            Reporter: Till Rohrmann
>            Assignee: Till Rohrmann
>            Priority: Critical
>
> The {{Dispatcher}} fails to recover jobs if a leader change happens during 
> the {{JobManagerRunner}} termination of the previous run. The problem is that 
> we schedule the start future of the recovered {{JobGraph}} using the 
> {{MainThreadExecutor}} and additionally require that this future is completed 
> before any other recovery operation from a subsequent leadership session is 
> executed. If now the leadership changes, the {{MainThreadExecutor}} will be 
> invalidated and the scheduled future will never be completed.
> The relevant ML thread: 
> http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/1-7-1-job-stuck-in-suspended-state-td26439.html



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to