Myasuka commented on a change in pull request #15119: URL: https://github.com/apache/flink/pull/15119#discussion_r596863568
########## File path: flink-runtime/src/main/java/org/apache/flink/runtime/state/AbstractKeyedStateBackend.java ########## @@ -289,8 +297,11 @@ public KeyGroupRange getKeyGroupRange() { stateDescriptor.initializeSerializerUnlessSet(executionConfig); } kvState = - TtlStateFactory.createStateAndWrapWithTtlIfEnabled( - namespaceSerializer, stateDescriptor, this, ttlTimeProvider); + LatencyTrackingStateFactory.trackLatencyIfEnabled( + TtlStateFactory.createStateAndWrapWithTtlIfEnabled( + namespaceSerializer, stateDescriptor, this, ttlTimeProvider), + stateDescriptor, + latencyTrackingStateConfig); Review comment: As we already have a `ChangeLogStateBackend` to delegate original keyed state backend, I think it might be a bit too much encapsulated to delegate again. However, I think your idea also inspires me as we could also let operator state could be tracked if we introduce another `DelegatingStateBackend` here. ---------------------------------------------------------------- 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