Github user EronWright commented on a diff in the pull request:
https://github.com/apache/flink/pull/4560#discussion_r134003593
--- 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 --
I was thinking along those same lines - the slot manager deals with
`InstanceID` mostly, and its log lines are tough to correlate with lower-level
resource manager information that is `ResourceID` based. It would be a nice
improvement to make `InstanceID` a composite key that included `ResourceID`.
Regardless, I think the `stopWorker` method should use `ResourceID`,
because `InstanceID` isn't a concept exposed to the RM subclasses.
---
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 [email protected] or file a JIRA ticket
with INFRA.
---