[
https://issues.apache.org/jira/browse/FLINK-16876?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17073622#comment-17073622
]
Jark Wu commented on FLINK-16876:
---------------------------------
Hi [~azagrebin], using {{ProcessingTimeService#getCurrentProcessingTime}}
sounds good to me, then we can use {{testHarness.setProcessingTime(1)}} to
advance processing time.
I'm not sure whether the exsiting {{MockStateBackend}} can satisfy, because we
want to test the state ttl logic both on Heap and Rocksdb backend. You can
take a look at {{GroupAggregateHarnessTest#testAggregateWithRetraction}}, where
we are using Processing Timer to cleanup state manually in GroupAggregate
operator. Currently, we want to migrate to {{StateTtlConfig}}, but got stuck by
the hard code {{TtlTimeProvider}}.
> Make TtlTimeProvider configurable when creating keyed state backend
> -------------------------------------------------------------------
>
> Key: FLINK-16876
> URL: https://issues.apache.org/jira/browse/FLINK-16876
> Project: Flink
> Issue Type: Improvement
> Components: Runtime / State Backends
> Affects Versions: 1.10.0
> Reporter: Yun Tang
> Priority: Major
>
> Currently, we would always use TtlTimeProvider.DEFAULT to create keyed state
> backend. This is somehow acceptable since we only support processing time for
> TTL now. However, this would make UT tests which would verify TTL logic not
> so convenient like FLINK-16581.
> I propose to let TtlTimeProvider configurable when creating keyed state
> backend to not block other feature development.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)