You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/04/14 11:56:51 UTC

[GitHub] [flink] XComp commented on a diff in pull request #19469: [FLINK-27222][coordination] Decouple last (al)location from execution history

XComp commented on code in PR #19469:
URL: https://github.com/apache/flink/pull/19469#discussion_r850363307


##########
flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionVertex.java:
##########
@@ -313,11 +296,15 @@ private <T> Optional<T> getLatestPriorProperty(Function<ArchivedExecution, T> ex
      * @return The latest prior execution location, or null, if there is none, yet.
      */
     public Optional<TaskManagerLocation> findLatestPriorLocation() {
-        return getLatestPriorProperty(ArchivedExecution::getAssignedResourceLocation);
+        return Optional.ofNullable(lastAssignedLocation);
+    }
+
+    void setLatestPriorAllocation(AllocationID lastAssignedAllocationID) {

Review Comment:
   I thought about it once more: I think it makes sense to merge `setLatestPriorAllocation` and `setLatestPrioirLocation` into something like `setLatestPriorSlotAssignment(TaskManagerLocation, AllocationID)` because both are closely related...



##########
flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionVertex.java:
##########
@@ -313,11 +296,15 @@ private <T> Optional<T> getLatestPriorProperty(Function<ArchivedExecution, T> ex
      * @return The latest prior execution location, or null, if there is none, yet.
      */
     public Optional<TaskManagerLocation> findLatestPriorLocation() {

Review Comment:
   Can we rephrase these `findLatestPrior*` and `setLatestPrior*` methods. Because we're setting it now when assigning the resource it means that we actually return the latest assignment and not the latest prior assignment...



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org