kezhuw commented on a change in pull request #15557: URL: https://github.com/apache/flink/pull/15557#discussion_r613127303
########## 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 guess "known" does not means "run on". The construction of whole RPC endpoint is not run in the main thread, so the assertion will fail in my expectation. -- 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: us...@infra.apache.org