tillrohrmann commented on a change in pull request #15557:
URL: https://github.com/apache/flink/pull/15557#discussion_r613205511
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/operators/coordination/OperatorCoordinatorHolder.java
##########
@@ -238,8 +241,11 @@ 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();
+ }
Review comment:
I think what needs to change from the `JobMasters` perspective is that
the `Scheduler` has to be created when `JobMaster.onStart` is called. Of
course, if the scheduler creates the `EG` synchronously, then this will block
the main thread which shouldn't be a huge problem, though. In any case, let's
tackle this as a potential follow up.
--
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]