Github user tillrohrmann commented on the issue:
https://github.com/apache/flink/pull/5774
I had to put another commit on top of it to fix a problem with the failing
`DispatcherTest#testWaitingForJobMasterLeadership` @GJL. The new commit makes
sure that we first recover all jobs before we set the fencing token of the
`Dispatcher`. That way, no other action can interfere with the job recover,
e.g. another job submission.---
