You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by tr...@apache.org on 2020/01/23 15:10:49 UTC

[flink] branch release-1.9 updated: [FLINK-14701][runtime] Fix MultiTaskSlot to not remove slots which are not its children

This is an automated email from the ASF dual-hosted git repository.

trohrmann pushed a commit to branch release-1.9
in repository https://gitbox.apache.org/repos/asf/flink.git


The following commit(s) were added to refs/heads/release-1.9 by this push:
     new 0bdd21a  [FLINK-14701][runtime] Fix MultiTaskSlot to not remove slots which are not its children
0bdd21a is described below

commit 0bdd21a36136538b554d7e4bd7ce80bc3c461596
Author: Zhu Zhu <re...@gmail.com>
AuthorDate: Thu Jan 16 12:15:10 2020 +0800

    [FLINK-14701][runtime] Fix MultiTaskSlot to not remove slots which are not its children
---
 .../apache/flink/runtime/jobmaster/slotpool/SlotSharingManager.java   | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

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 b1e1ceb..7195ce7 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
@@ -612,7 +612,9 @@ public class SlotSharingManager {
 				TaskSlot child = children.remove(childGroupId);
 
 				if (child != null) {
-					allTaskSlots.remove(child.getSlotRequestId());
+					if (child == allTaskSlots.get(child.getSlotRequestId())) {
+						allTaskSlots.remove(child.getSlotRequestId());
+					}
 
 					// Update the resources of this slot and the parents
 					releaseResource(child.getReservedResources());