StefanRRichter commented on a change in pull request #7188: [FLINK-10473][State TTL] TTL state incremental cleanup for heap backend URL: https://github.com/apache/flink/pull/7188#discussion_r246775496
########## File path: flink-runtime/src/main/java/org/apache/flink/runtime/state/ttl/TtlStateFactory.java ########## @@ -175,9 +173,41 @@ private IS createReducingState() throws Exception { ttlInitAcc, new TtlFoldFunction<>(foldingStateDescriptor.getFoldFunction(), ttlConfig, timeProvider, initAcc), new TtlSerializer<>(stateDesc.getSerializer())); - return (IS) new TtlFoldingState<>( - originalStateFactory.createInternalState(namespaceSerializer, ttlDescriptor, getSnapshotTransformFactory()), - ttlConfig, timeProvider, stateDesc.getSerializer()); + return (IS) new TtlFoldingState<>(createTtlStateContext(ttlDescriptor)); + } + + @SuppressWarnings("unchecked") + private <OIS, TTLCON, TTLDES> TTLCON createTtlStateContext(TTLDES ttlDescriptor) throws Exception { Review comment: Why are `TTLCON` and `TTLDES` generic types, it seems a bit odd. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on 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 With regards, Apache Git Services