flink
flink copied to clipboard
[FLINK-35268][state] Add ttl interface for Async State API && implement TtlListStateV2/TtlValueStateV2
What is the purpose of the change
- This PR supports ttl for stateV2, which adds ttl interfaces for Async State API, and implements
TtlListStateV2/TtlValueStateV2/TtlMapStateV2/TtlAggStateV2/TtlReducingStateV2.
Note: StateV2 does not support
FULL_STATE_SCAN_SNAPSHOT and INCREMENTAL_CLEANUP, only ROCKSDB_COMPACTION_FILTER will be supported.
Brief change log
- Introduce
AbstractTtlStateV2and its subclasses. - Wrap states of
ForStKeyedStateBackendwithTtlFactoryV2when ttl enabled. - Adapt
ForStDBTtlCompactFiltersManagertoForStKeyedStateBackend.
Verifying this change
This change added tests and can be verified as follows:
StateBackendTestV2Base#testValueStateWorkWithTtl
Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): (no)
- The public API, i.e., is any changed class annotated with
@Public(Evolving): (no) - The serializers: (no)
- The runtime per-record code paths (performance sensitive): (no)
- Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (no)
- The S3 file system connector: (no)
Documentation
- Does this pull request introduce a new feature? (no)
- If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)
CI report:
- ac0a6eac2bc0678f3beaf13673591cf266ba402b Azure: SUCCESS
Bot commands
The @flinkbot bot supports the following commands:@flinkbot run azurere-run the last Azure build
@flinkbot run azure
@flinkbot run azure
Thanks for the detailed review🚀, merged