Github user Wosin commented on a diff in the pull request: https://github.com/apache/flink/pull/6322#discussion_r202480724 --- Diff: flink-runtime/src/main/scala/org/apache/flink/runtime/jobmanager/JobManager.scala --- @@ -1759,11 +1759,22 @@ class JobManager( case None => None } - // remove all job-related BLOBs from local and HA store - libraryCacheManager.unregisterJob(jobID) - blobServer.cleanupJob(jobID, removeJobFromStateBackend) + // remove all job-related BLOBs from local and HA store, only if the job was removed correctly + futureOption match { + case Some(future) => future.onComplete{ + case scala.util.Success(_) => { + libraryCacheManager.unregisterJob(jobID) + blobServer.cleanupJob(jobID, removeJobFromStateBackend) --- End diff -- Technically we can, but this changes the return type of the future as `cleanupJob` does indeed return something.
---