Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.8.0
-
The background cleanup for state with time-to-live can be enabled with the method StateTtlConfig#cleanupInBackground() now. If the state backend supports the background cleanup, the default strategy will kick in.
Description
At the moment we have two efficient background cleanup strategies: incremental for heap and compaction filter for RocksDB. StateTtlConfig has 2 methods to activate them: cleanupIncrementally and cleanupInRocksdbCompactFilter. Each is activated only for certain backend type and inactive for other. They have different tuning parameters.
The idea is to add method cleanupInBackground which would activate default background cleanup. User does not need to think then about details or used backend if not needed. Depending on actually used backend, the corresponding cleanup will kick in. If original strategy is not set with cleanupIncrementally and cleanupInRocksdbCompactFilter then backends should check whether default background cleanup is activated and if so, use it with default parameters.
We can also deprecate the parameterless cleanupInRocksdbCompactFilter() in favour of this new method.
Attachments
Issue Links
- is depended upon by
-
FLINK-3089 State API Should Support Data Expiration (State TTL)
- Closed
- is related to
-
FLINK-14898 Enable background cleanup of state with TTL by default
- Closed
- links to