sjwiesman commented on issue #10281: [FLINK-14898] Enable background cleanup of 
state with TTL by default
URL: https://github.com/apache/flink/pull/10281#issuecomment-557162681
 
 
   @azagrebin there is an issue with the docs, the mean header section `Cleanup 
of Expired State` still says that by default expired records are only removed 
on read. I think it would be clearer to push the background compaction into 
that section since it is now the default. Because there is no diff on that 
section I can't comment inline but I think something like this would be clear. 
   
   > #### Cleanup of Expired State
   
   > By default, expired values are explicitly removed on read, such as 
`ValueState#value`, and periodically garbage collected in the background if 
supported by the configured state backend.
   Background cleanup can be disabled in the `StateTtlConfig`.
   
   ```
   <div class="codetabs" markdown="1">
   <div data-lang="java" markdown="1">
   {% highlight java %}
   import org.apache.flink.api.common.state.StateTtlConfig;
   StateTtlConfig ttlConfig = StateTtlConfig
       .newBuilder(Time.seconds(1))
       .disableCleanupInBackground()
       .build();
   {% endhighlight %}
   </div>
    <div data-lang="scala" markdown="1">
   {% highlight scala %}
   import org.apache.flink.api.common.state.StateTtlConfig
   val ttlConfig = StateTtlConfig
       .newBuilder(Time.seconds(1))
       .disableCleanupInBackground
       .build
   {% endhighlight %}
   </div>
   </div>
   ```
   

----------------------------------------------------------------
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