Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: prior to the fix there was an Exception now we issue the return. I think there should be a test for this, as there is a change in behaviour.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

channelIOExecutor.execute(
() -> {
try {
reader.readInputData(inputGates);
} catch (Exception e) {
asyncExceptionHandler.handleAsyncException(
"Unable to read channel state", e);
}
});
}

// We wait for all input channel state to recover before we go into RUNNING state, and thus
// start checkpointing. If we implement incremental checkpointing of input channel state
Expand Down