StephanEwen commented on a change in pull request #15601:
URL: https://github.com/apache/flink/pull/15601#discussion_r613006274



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/operators/coordination/OperatorCoordinatorHolder.java
##########
@@ -237,38 +244,56 @@ public void notifyCheckpointAborted(long checkpointId) {
     @Override
     public void resetToCheckpoint(long checkpointId, @Nullable byte[] 
checkpointData)
             throws Exception {
-        // ideally we would like to check this here, however this method is 
called early during
-        // execution graph construction, before the main thread executor is set
+        // the first time this method is called is early during execution 
graph construction,
+        // before the main thread executor is set. hence this conditional 
check.
+        if (mainThreadExecutor != null) {
+            mainThreadExecutor.assertRunningInMainThread();
+        }
+
+        eventValve.openValveAndUnmarkCheckpoint();
 
-        eventValve.reset();
         if (context != null) {

Review comment:
       True, that is a leftover from before. Will add a cleanup commit to 
remove this.




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