From 77724441abfcb2342bc1495f820bb38eeea4f1f7 Mon Sep 17 00:00:00 2001 From: Enwei Date: Fri, 15 Apr 2022 18:04:36 +0800 Subject: [PATCH] TiKV config: add warnings about `enable-ttl` (#8069) --- tikv-configuration-file.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tikv-configuration-file.md b/tikv-configuration-file.md index 40d2870e4c7f3..9827ae3ebc5fa 100644 --- a/tikv-configuration-file.md +++ b/tikv-configuration-file.md @@ -331,8 +331,12 @@ Configuration items related to storage ### `enable-ttl` New in v5.0 GA +> **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` New in v5.0 GA