Github user tillrohrmann commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4560#discussion_r133980216
  
    --- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/ResourceManager.java
 ---
    @@ -960,12 +965,26 @@ public void handleError(final Exception exception) {
     
                @Override
                public void releaseResource(InstanceID instanceId) {
    -                   stopWorker(instanceId);
    +                   runAsync(new Runnable() {
    +                           @Override
    +                           public void run() {
    +                                   for (Map.Entry<ResourceID, 
WorkerRegistration<WorkerType>> entry : taskExecutors.entrySet()) {
    +                                           if 
(entry.getValue().getInstanceID().equals(instanceId)) {
    +                                                   
stopWorker(entry.getKey());
    --- End diff --
    
    In the future we should make these ids being composed of each other. Then 
we should easily obtain the `ResourceID` from the `InstanceID`


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to