beliefer commented on code in PR #26465:
URL: https://github.com/apache/flink/pull/26465#discussion_r2046587512


##########
flink-runtime/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTask.java:
##########
@@ -862,15 +862,17 @@ private CompletableFuture<Void> restoreStateAndGates(
                 INITIALIZE_STATE_DURATION, initializeStateEndTs - 
readOutputDataTs);
         IndexedInputGate[] inputGates = getEnvironment().getAllInputGates();
 
-        channelIOExecutor.execute(
-                () -> {
-                    try {
-                        reader.readInputData(inputGates);
-                    } catch (Exception e) {
-                        asyncExceptionHandler.handleAsyncException(
-                                "Unable to read channel state", e);
-                    }
-                });
+        if (inputGates.length > 0) {

Review Comment:
   There are many test cases trigger this case, such as 
testFailingAsyncCheckpointRunnable, testStateBackendLoadingAndClosing, 
testHandleAsyncExceptionDuringRestoring, testProcessWithUnAvailableOutput, 
testProcessWithRaceInDataAvailability, 
testEmptySubtaskStateLeadsToStatelessAcknowledgment, 
testStateBackendClosingOnFailure, 
testExecuteMailboxActionsAfterLeavingInputProcessorMailboxLoop, 
testUncaughtExceptionInAsynchronousCheckpointingOperation, 
testDecliningCheckpointStreamOperator, testProcessWithUnAvailableInput, 
testAsyncCheckpointingConcurrentCloseAfterAcknowledge, 
testAsyncCheckpointingConcurrentCloseBeforeAcknowledge, testThreadInvariants, 
testTaskAvoidHangingAfterSnapshotStateThrownException, 
testMailboxMetricsScheduling, testRestorePerformedOnlyOnce, 
testRestorePerformedFromInvoke, testEarlyCanceling, 
testProcessWithAvailableOutput, 
testQuiesceOfMailboxRightBeforeSubmittingActionViaTimerService in StreamTaskTest



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

To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to