zhuzhurk commented on a change in pull request #9902: [FLINK-14363][runtime] 
Prevent vertex from being affected by outdated deployment
URL: https://github.com/apache/flink/pull/9902#discussion_r338177737
 
 

 ##########
 File path: 
flink-runtime/src/test/java/org/apache/flink/runtime/scheduler/DefaultSchedulerTest.java
 ##########
 @@ -335,15 +336,51 @@ public void scheduleOnlyIfVertexIsCreated() throws 
Exception {
                }
        }
 
+       @Test
+       public void vertexIsNotAffectedByOutdatedDeployment() {
+               final JobGraph jobGraph = singleNonParallelJobVertexJobGraph(2);
+
+               testExecutionSlotAllocator.disableAutoCompletePendingRequests();
+               final DefaultScheduler scheduler = 
createSchedulerAndStartScheduling(jobGraph);
+
+               final Iterator<ArchivedExecutionVertex> vertexIterator = 
scheduler.requestJob().getAllExecutionVertices().iterator();
+               final ArchivedExecutionVertex v1 = vertexIterator.next();
+               final ArchivedExecutionVertex v2 = vertexIterator.next();
+
+               final SchedulingExecutionVertex sv1 = 
scheduler.getSchedulingTopology().getVertices().iterator().next();
+
+               // fail v1 and let it recover to SCHEDULED
+               scheduler.updateTaskExecutionState(new TaskExecutionState(
+                       jobGraph.getJobID(),
+                       v1.getCurrentExecutionAttempt().getAttemptId(),
+                       ExecutionState.FAILED));
+               taskRestartExecutor.triggerScheduledTasks();
+
+               // fail v2 to finish all pending slot requests of the last round
 
 Review comment:
   In `EAGER` mode, v1 and v2 are scheduled in a batch. So that the pending 
slot request of v2 also blocks the deployment of v1.
   Here we fail v2 to complete(cancel) its pending slot request to trigger 
`deployOrHandleError` of v1's outdated deployment.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to