From 647b42b131927756e3f280cfb243d6eb54fe699b Mon Sep 17 00:00:00 2001 From: Aolin Date: Mon, 26 Sep 2022 14:17:44 +0800 Subject: [PATCH] Edit pitr compatible description with add index lightning feature (#10543) --- br/pitr-known-issues.md | 10 ++++++++++ system-variables.md | 12 ++++++++++++ 2 files changed, 22 insertions(+) diff --git a/br/pitr-known-issues.md b/br/pitr-known-issues.md index 0cce4ca938083..70f05219b3f45 100644 --- a/br/pitr-known-issues.md +++ b/br/pitr-known-issues.md @@ -68,3 +68,13 @@ For the current version, it is recommended that you perform a snapshot backup af Issue: [#13304](https://github.com/tikv/tikv/issues/13304) When there is a large transaction, the log checkpoint lag is not updated before the transaction is committed. Therefore, the checkpoint lag is increased by a period of time close to the commit time of the transaction. + +## The acceleration of adding indexes feature is not compatible with PITR + +Issue: [#38045](https://github.com/pingcap/tidb/issues/38045) + +Currently, the [acceleration of adding indexes](/system-variables.md#tidb_ddl_enable_fast_reorg-new-in-v630) feature is not compatible with PITR. When using index acceleration, you need to ensure that there are no PITR log backup tasks running in the background. Otherwise, unexpected behaviors might occur, including: + +- If you start a log backup task first, and then add an index. The adding index process is not accelerated even if index acceleration is enabled. But the index is added in a slow way. +- If you start an index acceleration task first, and then start a log backup task. The log backup task returns an error. But the index acceleration is not affected. +- If you start a log backup task and an index acceleration task at the same time, the two tasks might not be aware of each other. This might result in PITR failing to back up the newly added index. diff --git a/system-variables.md b/system-variables.md index bbf65bcef49cd..b56cc000aafb2 100644 --- a/system-variables.md +++ b/system-variables.md @@ -886,6 +886,18 @@ MPP is a distributed computing framework provided by the TiFlash engine, which a - Default value: `OFF` - This variable controls whether to enable the acceleration of `ADD INDEX` and `CREATE INDEX` DDl operations to improve the speed of backfilling when creating an index. If this variable is enabled, TiDB uses a more effective way to create an index. + + +> **Warning:** +> +> Currently, this feature is not compatible with [PITR (Point-in-time recovery)](/br/point-in-time-recovery.md). When using index acceleration, you need to ensure that there are no PITR log backup tasks running in the background. Otherwise, unexpected behaviors might occur, including: +> +> - If you start a log backup task first, and then add an index. The adding index process is not accelerated even if index acceleration is enabled. But the index is added in a slow way. +> - If you start an index acceleration task first, and then start a log backup task. The log backup task returns an error. But the index acceleration is not affected. +> - If you start a log backup task and an index acceleration task at the same time, the two tasks might not be aware of each other. This might result in PITR failing to back up the newly added index. + + + ### tidb_ddl_error_count_limit - Scope: GLOBAL