Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-12476

[State TTL] Consider setting a default background cleanup strategy in StateTtlConfig

    XMLWordPrintableJSON

Details

    • 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

          Activity

            People

              yanghua vinoyang
              azagrebin Andrey Zagrebin
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m