Hi Lec Ssmi,

It depends on the state backend you use.
The heap state backend needs that either some state access happens or some
records get processed in the operator [1].
The RocksDB requires that the state size is big enough (roughly speaking)
to trigger the compaction process to clean the expired state [2].
Please, see the notes in the user documentation chapters referred by the
suggested links.

Best,
Andrey

[1]
https://ci.apache.org/projects/flink/flink-docs-release-1.10/dev/stream/state/state.html#incremental-cleanup
[2]
https://ci.apache.org/projects/flink/flink-docs-release-1.10/dev/stream/state/state.html#cleanup-during-rocksdb-compaction

On Tue, Jun 2, 2020 at 5:23 PM lec ssmi <shicheng31...@gmail.com> wrote:

>     As we known, flink can set certain TTL config for the state, so that
> the state can be  automatically cleared after being idle for a period of
> time.
> But if there is no new record coming in after setting  the TTL config ,
> will the state be automatically cleared after a certain time? Or does it
> require a new  record  to trigger this clear operation ?
>
> Thanks!
>
>

Reply via email to