StefanRRichter commented on a change in pull request #7188: [FLINK-10473][State 
TTL] TTL state incremental cleanup for heap backend
URL: https://github.com/apache/flink/pull/7188#discussion_r247837409
 
 

 ##########
 File path: 
flink-core/src/main/java/org/apache/flink/api/common/state/StateTtlConfig.java
 ##########
 @@ -269,5 +300,37 @@ public StateTtlConfig build() {
                public boolean inFullSnapshot() {
                        return 
strategies.containsKey(Strategies.FULL_STATE_SCAN_SNAPSHOT);
                }
+
+               public IncrementalCleanupStrategy 
getIncrementalCleanupStrategy() {
+                       return (IncrementalCleanupStrategy) 
strategies.get(Strategies.INCREMENTAL_CLEANUP);
+               }
+       }
+
+       /** Configuration of cleanup strategy while taking the full snapshot.  
*/
+       public static class IncrementalCleanupStrategy implements 
CleanupStrategies.CleanupStrategy {
+               private static final long serialVersionUID = 
3109278696501988780L;
+
+               /** Max number of pulled from queue keys for clean up upon 
state touch for any key. */
+               private final int cleanupSize;
+
+               /** Whether to run incremental cleanup per state access. */
+               private final boolean runCleanupForEveryRecord;
 
 Review comment:
   So this should maybe called `runCleanupOnStateAccess`?

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


With regards,
Apache Git Services

Reply via email to