StephanEwen commented on a change in pull request #15557:
URL: https://github.com/apache/flink/pull/15557#discussion_r613146889
##########
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:
Let's definitely look at this in a follow-up. It'd be super happy to get
rid of the lazy initialization, if possible.
But that means that the main thread executor would need to be already used
for the call that restores the initial savepoint. We should double check
whether that is the case.
--
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]