curcur commented on a change in pull request #14799: URL: https://github.com/apache/flink/pull/14799#discussion_r578323771
########## File path: flink-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/InternalTimeServiceManagerImpl.java ########## @@ -99,23 +101,30 @@ private InternalTimeServiceManagerImpl( * <p><b>IMPORTANT:</b> Keep in sync with {@link InternalTimeServiceManager.Provider}. */ public static <K> InternalTimeServiceManagerImpl<K> create( - CheckpointableKeyedStateBackend<K> keyedStatedBackend, + CheckpointableKeyedStateBackend<K> keyedStateBackend, ClassLoader userClassloader, KeyContext keyContext, ProcessingTimeService processingTimeService, Iterable<KeyGroupStatePartitionStreamProvider> rawKeyedStates) throws Exception { - final KeyGroupRange keyGroupRange = keyedStatedBackend.getKeyGroupRange(); + final KeyGroupRange keyGroupRange = keyedStateBackend.getKeyGroupRange(); + + KeyedStateBackend<?> rootKeyedStateBackend = + keyedStateBackend instanceof ProxyKeyedStateBackend + ? ((ProxyKeyedStateBackend<?>) keyedStateBackend) + .getProxiedKeyedStateBackend() + : keyedStateBackend; + final boolean requiresSnapshotLegacyTimers = - keyedStatedBackend instanceof AbstractKeyedStateBackend - && ((AbstractKeyedStateBackend<K>) keyedStatedBackend) + rootKeyedStateBackend instanceof AbstractKeyedStateBackend + && ((AbstractKeyedStateBackend<K>) rootKeyedStateBackend) Review comment: Yes, that's a good idea ---------------------------------------------------------------- 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