azagrebin commented on a change in pull request #8459: [FLINK-12476] [State 
TTL] Consider setting a default background cleanup strategy in StateTtlConfig
URL: https://github.com/apache/flink/pull/8459#discussion_r284658756
 
 

 ##########
 File path: 
flink-core/src/main/java/org/apache/flink/api/common/state/StateTtlConfig.java
 ##########
 @@ -327,6 +329,14 @@ public Builder cleanupInRocksdbCompactFilter(long 
queryTimeAfterNumEntries) {
                        return this;
                }
 
+               /**
+                * Cleanup expired state by activating both strategies. 
Depending on actually used backend, the corresponding cleanup will kick in.
+                */
+               @Nonnull
+               public Builder cleanupInBackground() {
+                       return cleanupIncrementally(10, 
true).cleanupInRocksdbCompactFilter(1000L);
 
 Review comment:
   @aljoscha true, we can move concrete decision about default configuration to 
backends.
   
   @yanghua the method `cleanupInBackground` should be  still added but rather 
as a boolean flag in StateTtlConfig. Backends should check this flag where they 
check configuration of their corresponding cleanup strategies and use default 
ones.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to