You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by zh...@apache.org on 2020/06/23 12:31:29 UTC

[flink] branch master updated (d45a5f0 -> d04d1f4)

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

zhuzh pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git.


    from d45a5f0  [FLINK-17297] Log the lineage information between ExecutionAttemptID and SlotRequestID
     new 480c11c  [hotfix][runtime] Simplify SlotPoolImpl#maybeRemapOrphanedAllocation
     new d04d1f4  [FLINK-18407][runtime] Harden SlotPoolImpl#maybeRemapOrphanedAllocation

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../runtime/jobmaster/slotpool/SlotPoolImpl.java     | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)


[flink] 02/02: [FLINK-18407][runtime] Harden SlotPoolImpl#maybeRemapOrphanedAllocation

Posted by zh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zhuzh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git

commit d04d1f4a4bf41d26d28835d7a7551408274187c0
Author: Zhu Zhu <re...@gmail.com>
AuthorDate: Mon Jun 22 19:45:41 2020 +0800

    [FLINK-18407][runtime] Harden SlotPoolImpl#maybeRemapOrphanedAllocation
---
 .../org/apache/flink/runtime/jobmaster/slotpool/SlotPoolImpl.java     | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/slotpool/SlotPoolImpl.java b/flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/slotpool/SlotPoolImpl.java
index 29d9d53..f5c2319 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/slotpool/SlotPoolImpl.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/slotpool/SlotPoolImpl.java
@@ -614,7 +614,9 @@ public class SlotPoolImpl implements SlotPool {
 				// request id of the allocated slot can be null if the slot is returned by scheduler.
 				// the orphaned allocation will not be adopted in this case, which means it is not needed
 				// anymore by any pending requests. we should cancel it to avoid allocating unnecessary slots.
-				resourceManagerGateway.cancelSlotRequest(allocationIdOfRequest);
+				if (resourceManagerGateway != null) {
+					resourceManagerGateway.cancelSlotRequest(allocationIdOfRequest);
+				}
 			}
 		}
 	}


[flink] 01/02: [hotfix][runtime] Simplify SlotPoolImpl#maybeRemapOrphanedAllocation

Posted by zh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zhuzh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git

commit 480c11c776781531559633e9122db6ad6514093c
Author: Zhu Zhu <re...@gmail.com>
AuthorDate: Mon Jun 22 18:46:19 2020 +0800

    [hotfix][runtime] Simplify SlotPoolImpl#maybeRemapOrphanedAllocation
---
 .../flink/runtime/jobmaster/slotpool/SlotPoolImpl.java   | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/slotpool/SlotPoolImpl.java b/flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/slotpool/SlotPoolImpl.java
index 62f6144..29d9d53 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/slotpool/SlotPoolImpl.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/slotpool/SlotPoolImpl.java
@@ -601,13 +601,15 @@ public class SlotPoolImpl implements SlotPool {
 		// if the request of that allocated slot is still pending, it should take over the orphaned allocation.
 		// this enables the request to fail fast if the remapped allocation fails.
 		if (!allocationIdOfRequest.equals(allocationIdOfSlot)) {
-			final SlotRequestId requestIdOfAllocatedSlot = pendingRequests.getKeyAByKeyB(allocationIdOfSlot);
-			if (requestIdOfAllocatedSlot != null) {
-				final PendingRequest requestOfAllocatedSlot = pendingRequests.getValueByKeyA(requestIdOfAllocatedSlot);
-				checkNotNull(requestOfAllocatedSlot).setAllocationId(allocationIdOfRequest);
-
-				// this re-insertion of initiatedRequestId will not affect its original insertion order
-				pendingRequests.put(requestIdOfAllocatedSlot, allocationIdOfRequest, requestOfAllocatedSlot);
+			final PendingRequest requestOfAllocatedSlot = pendingRequests.getValueByKeyB(allocationIdOfSlot);
+			if (requestOfAllocatedSlot != null) {
+				requestOfAllocatedSlot.setAllocationId(allocationIdOfRequest);
+
+				// this re-insertion of request will not affect its original insertion order
+				pendingRequests.put(
+					requestOfAllocatedSlot.getSlotRequestId(),
+					allocationIdOfRequest,
+					requestOfAllocatedSlot);
 			} else {
 				// request id of the allocated slot can be null if the slot is returned by scheduler.
 				// the orphaned allocation will not be adopted in this case, which means it is not needed