XComp commented on a change in pull request #18536:
URL: https://github.com/apache/flink/pull/18536#discussion_r798527257



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/jobmanager/DefaultJobGraphStore.java
##########
@@ -252,9 +255,11 @@ public void putJobGraph(JobGraph jobGraph) throws 
Exception {
 
                     synchronized (lock) {
                         verifyIsRunning();
-                        if (addedJobGraphs.contains(jobId)) {
+                        if (addedJobGraphs.contains(jobId)
+                                || locallyReleasedJobGraphs.contains(jobId)) {

Review comment:
       true - I lacked some bigger picture here. The initial wrong-doing was 
that I removed the `GloballyCleanableResource` interface from the 
`JobManagerRunnerRegistry`. That required me to call `localCleanup` before 
calling the `globalCleanup` in the Dispatcher (because we still want to run the 
cleanup on the `JobManagerRunnerRegistry` even for the `globalCleanup`). 
   
   Essentially, what we want to do is to make `JobManagerRunnerRegistry` 
implement `GloballyCleanableResource` as well (even though it doesn't have 
global resources). That enables the `Dispatcher` to call `localCleanup` and 
`globalCleanup` separately. 🤦 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to