From 5cfa04afe84c6b4cd0811ecab1ce37e2126caabf Mon Sep 17 00:00:00 2001 From: Ti Chi Robot Date: Wed, 3 Apr 2024 14:51:18 +0800 Subject: [PATCH] cdc: fix compatibility with TiDB Lightning (#16948) (#16951) --- ticdc/ticdc-faq.md | 8 ++++---- ticdc/ticdc-overview.md | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ticdc/ticdc-faq.md b/ticdc/ticdc-faq.md index 28b64d442dd98..058dd245998ad 100644 --- a/ticdc/ticdc-faq.md +++ b/ticdc/ticdc-faq.md @@ -270,15 +270,15 @@ If you need to replicate `recover table` to the downstream TiDB, you should have When upstream write traffic is at peak hours, the downstream may fail to consume all data in a timely manner, resulting in data pile-up. TiCDC uses disks to process the data that is piled up. TiCDC needs to write data to disks during normal operation. However, this is not usually the bottleneck for replication throughput and replication latency, given that writing to disks only results in latency within a hundred milliseconds. TiCDC also uses memory to accelerate reading data from disks to improve replication performance. -## Why does replication using TiCDC stall or even stop after data restore using TiDB Lightning and BR from upstream? +## Why does replication using TiCDC stall or even stop after data restore using TiDB Lightning physical import mode and BR from upstream? -Currently, TiCDC is not yet fully compatible with TiDB Lightning and BR. Therefore, avoid using TiDB Lightning and BR on tables that are replicated by TiCDC. Otherwise, unknown errors might occur, such as TiCDC replication getting stuck, a significant spike in replication latency, or data loss. +Currently, TiCDC is not yet fully compatible with [TiDB Lightning physical import mode](/tidb-lightning/tidb-lightning-physical-import-mode.md) and BR. Therefore, avoid using TiDB Lightning physical import mode and BR on tables that are replicated by TiCDC. Otherwise, unknown errors might occur, such as TiCDC replication getting stuck, a significant spike in replication latency, or data loss. -If you need to use TiDB Lightning or BR to restore data for some tables replicated by TiCDC, take these steps: +If you need to use TiDB Lightning physical import mode or BR to restore data for some tables replicated by TiCDC, take these steps: 1. Remove the TiCDC replication task related to these tables. -2. Use TiDB Lightning or BR to restore data separately in the upstream and downstream clusters of TiCDC. +2. Use TiDB Lightning physical import mode or BR to restore data separately in the upstream and downstream clusters of TiCDC. 3. After the restoration is complete and data consistency between the upstream and downstream clusters is verified, create a new TiCDC replication task for incremental replication, with the timestamp (TSO) from the upstream backup as the `start-ts` for the task. For example, assuming the snapshot timestamp of the BR backup in the upstream cluster is `431434047157698561`, you can create a new TiCDC replication task using the following command: diff --git a/ticdc/ticdc-overview.md b/ticdc/ticdc-overview.md index 6b41933dd1e4c..31812144ab147 100644 --- a/ticdc/ticdc-overview.md +++ b/ticdc/ticdc-overview.md @@ -92,6 +92,6 @@ Currently, the following scenarios are not supported: - A TiKV cluster that uses RawKV alone. - The [`CREATE SEQUENCE` DDL operation](/sql-statements/sql-statement-create-sequence.md) and the [`SEQUENCE` function](/sql-statements/sql-statement-create-sequence.md#sequence-function) in TiDB. When the upstream TiDB uses `SEQUENCE`, TiCDC ignores `SEQUENCE` DDL operations/functions performed upstream. However, DML operations using `SEQUENCE` functions can be correctly replicated. -- Currently, performing [BR data recovery](/br/backup-and-restore-overview.md) and [TiDB Lightning](/tidb-lightning/tidb-lightning-overview.md) imports on tables and databases that are being replicated by TiCDC is not supported. For more information, see [Why does replication using TiCDC stall or even stop after data restore using TiDB Lightning and BR from upstream](/ticdc/ticdc-faq.md#why-does-replication-using-ticdc-stall-or-even-stop-after-data-restore-using-tidb-lightning-and-br-from-upstream). +- Currently, performing [BR data recovery](/br/backup-and-restore-overview.md) and [TiDB Lightning physical import](/tidb-lightning/tidb-lightning-physical-import-mode.md) imports on tables and databases that are being replicated by TiCDC is not supported. For more information, see [Why does replication using TiCDC stall or even stop after data restore using TiDB Lightning and BR from upstream](/ticdc/ticdc-faq.md#why-does-replication-using-ticdc-stall-or-even-stop-after-data-restore-using-tidb-lightning-physical-import-mode-and-br-from-upstream). TiCDC only partially supports scenarios involving large transactions in the upstream. For details, refer to the [TiCDC FAQ](/ticdc/ticdc-faq.md#does-ticdc-support-replicating-large-transactions-is-there-any-risk), where you can find details on whether TiCDC supports replicating large transactions and any associated risks.