Zakelly commented on code in PR #25560:
URL: https://github.com/apache/flink/pull/25560#discussion_r1812449913
##########
flink-runtime/src/main/java/org/apache/flink/streaming/api/operators/StreamTaskStateInitializerImpl.java:
##########
@@ -252,31 +263,32 @@ public StreamOperatorStateContext
streamOperatorStateContext(
(prioritizedOperatorSubtaskStates.isRestored() &&
!isUsingCustomRawKeyedState)
? rawKeyedStateInputs
: Collections.emptyList();
- if (keyedStatedBackend != null) {
- timeServiceManager =
- timeServiceManagerProvider.create(
-
environment.getMetricGroup().getIOMetricGroup(),
- keyedStatedBackend,
- keyedStatedBackend.getKeyGroupRange(),
-
environment.getUserCodeClassLoader().asClassLoader(),
- keyContext,
- processingTimeService,
- restoredRawKeyedStateTimers,
- cancellationContext);
- }
- if (stateBackend.supportsAsyncKeyedStateBackend()) {
- asyncTimeServiceManager =
- timeServiceManagerProvider.create(
-
environment.getMetricGroup().getIOMetricGroup(),
- asyncKeyedStateBackend,
- asyncKeyedStateBackend.getKeyGroupRange(),
-
environment.getUserCodeClassLoader().asClassLoader(),
- keyContext,
- processingTimeService,
- restoredRawKeyedStateTimers,
- cancellationContext);
+ if (isAsyncState) {
+ if (asyncKeyedStateBackend != null) {
Review Comment:
In this case, the `AsyncKeyedStateBackendAdaptor#create` is invoked. So yes,
this is the current behavior.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]