AHeise commented on a change in pull request #12186:
URL: https://github.com/apache/flink/pull/12186#discussion_r426144371



##########
File path: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/OperatorChain.java
##########
@@ -262,7 +262,9 @@ public void prepareSnapshotPreBarrier(long checkpointId) 
throws Exception {
                // go forward through the operator chain and tell each operator
                // to prepare the checkpoint
                for (StreamOperatorWrapper<?, ?> operatorWrapper : 
getAllOperators()) {
-                       
operatorWrapper.getStreamOperator().prepareSnapshotPreBarrier(checkpointId);
+                       if (!operatorWrapper.isClosed()) {
+                               
operatorWrapper.getStreamOperator().prepareSnapshotPreBarrier(checkpointId);
+                       }

Review comment:
       I was also think about that. The question is should we then replace it 
for all `StreamOperatorWrapper.getOperator ` calls eventually?

##########
File path: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/SubtaskCheckpointCoordinatorImpl.java
##########
@@ -269,16 +284,18 @@ private void takeSnapshotSync(
 
                try {
                        for (StreamOperatorWrapper<?, ?> operatorWrapper : 
operatorChain.getAllOperators(true)) {
-                               operatorSnapshotsInProgress.put(
-                                       
operatorWrapper.getStreamOperator().getOperatorID(),
-                                       buildOperatorSnapshotFutures(
-                                               checkpointMetaData,
-                                               checkpointOptions,
-                                               operatorChain,
-                                               
operatorWrapper.getStreamOperator(),
-                                               isCanceled,
-                                               channelStateWriteResult,
-                                               storage));
+                               if (!operatorWrapper.isClosed()) {

Review comment:
       yep sorry that's a left over from the previous version.




----------------------------------------------------------------
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]


Reply via email to