Skip to content

Commit

Permalink
TiKV config: add warnings about enable-ttl (#8069) (#8235)
Browse files Browse the repository at this point in the history
  • Loading branch information
ti-chi-bot authored Apr 15, 2022
1 parent 1387dd5 commit 398b385
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tikv-configuration-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -331,8 +331,12 @@ Configuration items related to storage

### `enable-ttl` <span class="version-mark">New in v5.0 GA</span>

> **Warning:**
>
> - Set `enable-ttl` to `true` or `false` **ONLY WHEN** deploying a new TiKV cluster. **DO NOT** modify the value of this configuration item in an existing TiKV cluster. TiKV clusters with different `enable-ttl` values use different data formats. Therefore, if you modify the value of this item in an existing TiKV cluster, the cluster will store data in different formats, which causes the "can't enable TTL on a non-ttl" error when you restart the TiKV cluster.
> - Use `enable-ttl` **ONLY IN** a TiKV cluster. **DO NOT** use this configuration item in a cluster that has TiDB nodes (which means setting `enable-ttl` to `true` in such clusters). Otherwise, critical issues such as data corruption and the upgrade failure of TiDB clusters will occur.
+ TTL is short for "Time to live". If this item is enabled, TiKV automatically deletes data that reaches its TTL. To set the value of TTL, you need to specify it in the requests when writing data via the client. If the TTL is not specified, it means that TiKV does not automatically delete the corresponding data.
+ Note: The TTL feature is only available for the RawKV interface for now. You can only configure this feature when creating a new cluster because TTL uses different data formats in the storage layer. If you modify this item on an existing cluster, TiKV reports errors when it starts.
+ Default value: `false`

### `ttl-check-poll-interval` <span class="version-mark">New in v5.0 GA</span>
Expand Down

0 comments on commit 398b385

Please sign in to comment.