rkhachatryan commented on a change in pull request #11534: 
[FLINK-16537][network] Implement ResultPartition state recovery for unaligned 
checkpoint
URL: https://github.com/apache/flink/pull/11534#discussion_r400485072
 
 

 ##########
 File path: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTask.java
 ##########
 @@ -434,6 +434,13 @@ protected void beforeInvoke() throws Exception {
                        // so that we avoid race conditions in the case that 
initializeState()
                        // registers a timer, that fires before the open() is 
called.
                        
operatorChain.initializeStateAndOpenOperators(createStreamTaskStateInitializer());
+
+                       ResultPartitionWriter[] writers = 
getEnvironment().getAllWriters();
+                       if (writers != null) {
+                               for (ResultPartitionWriter writer : writers) {
+                                       writer.initializeState();
+                               }
+                       }
 
 Review comment:
   Should we close the reader here? Or it will be used for InputChannels later?

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