gaoyunhaii commented on a change in pull request #16905:
URL: https://github.com/apache/flink/pull/16905#discussion_r695898714



##########
File path: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/MultipleInputStreamTask.java
##########
@@ -244,6 +235,29 @@ protected void createInputProcessor(
         return resultFuture;
     }
 
+    private CompletableFuture<Boolean> triggerStopWithSavepointWithDrainAsync(
+            CheckpointMetaData checkpointMetaData, CheckpointOptions 
checkpointOptions) {
+        mainMailboxExecutor.execute(
+                () -> {
+                    
setSynchronousSavepoint(checkpointMetaData.getCheckpointId(), true);
+                    operatorChain.getSourceTaskInputs().forEach(s -> 
s.getOperator().stop());
+                },
+                "stop chained Flip-27 source for stop-with-savepoint --drain");
+
+        CompletableFuture<Void> sourcesStopped =
+                FutureUtils.waitForAll(
+                        operatorChain.getSourceTaskInputs().stream()
+                                .map(s -> s.getOperator().getFinishedFuture())
+                                .collect(Collectors.toList()));

Review comment:
       Very thanks for pointing out this issue! I also think it should be an 
issue, I updated PR to avoid the possible concurrent access~




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to