When a JobMaster is stopped, we first disconnect all TaskExecutors. This disconnection causes potentially running Executions to fail. This in turn can cause a restart of the job or in the worst case a transition into FAILED state if the restarts are depleted. This again can cause the clean up of HA data.
Instead of failing the job, the job should be suspended if the JobMaster gets stopped because this happens if the Dispatcher loses its leadership. The problem has been fixed unintentionally by
FLINK-19237 in the master branch.