[hotfix] Avoid redundant slot release operations
Project: http://git-wip-us.apache.org/repos/asf/flink/repo Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/4fc3bcf3 Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/4fc3bcf3 Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/4fc3bcf3 Branch: refs/heads/master Commit: 4fc3bcf382a4c99ac88adebaf1d950bba0cc7b53 Parents: 107c8e0 Author: Till Rohrmann <[email protected]> Authored: Thu Feb 22 15:37:28 2018 +0100 Committer: Till Rohrmann <[email protected]> Committed: Sat Feb 24 15:04:56 2018 +0100 ---------------------------------------------------------------------- .../flink/runtime/jobmaster/slotpool/SlotSharingManager.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flink/blob/4fc3bcf3/flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/slotpool/SlotSharingManager.java ---------------------------------------------------------------------- diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/slotpool/SlotSharingManager.java b/flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/slotpool/SlotSharingManager.java index 204a4e5..fd6be46 100644 --- a/flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/slotpool/SlotSharingManager.java +++ b/flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/slotpool/SlotSharingManager.java @@ -537,9 +537,8 @@ public class SlotSharingManager { if (parent != null) { // we remove ourselves from our parent if we no longer have children parent.releaseChild(getGroupId()); - } else { + } else if (allTaskSlots.remove(getSlotRequestId()) != null) { // we are the root node --> remove the root node from the list of task slots - allTaskSlots.remove(getSlotRequestId()); if (!slotContextFuture.isDone() || slotContextFuture.isCompletedExceptionally()) { synchronized (lock) {
