Skip to content

Commit a3de718

Browse files
authored
ticdc: add new doc for TiCDC data replication capabilities (#20967) (#21022)
1 parent 9a40c3b commit a3de718

File tree

3 files changed

+49
-1
lines changed

3 files changed

+49
-1
lines changed

TOC.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -607,6 +607,7 @@
607607
- [Alert Rules](/ticdc/ticdc-alert-rules.md)
608608
- Reference
609609
- [Architecture](/ticdc/ticdc-architecture.md)
610+
- [TiCDC Data Replication Capabilities](/ticdc/ticdc-data-replication-capabilities.md)
610611
- [TiCDC Server Configurations](/ticdc/ticdc-server-config.md)
611612
- [TiCDC Changefeed Configurations](/ticdc/ticdc-changefeed-config.md)
612613
- Output Protocols
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
title: TiCDC Data Replication Capabilities
3+
summary: Learn the data replication capabilities of TiCDC.
4+
---
5+
6+
# TiCDC Data Replication Capabilities
7+
8+
[TiCDC](/ticdc/ticdc-overview.md) (TiDB Change Data Capture) is a core component in the TiDB ecosystem for real-time data replication. This document provides a detailed explanation of TiCDC data replication capabilities.
9+
10+
## How TiCDC works
11+
12+
- TiCDC listens to TiKV change logs (Raft logs) and converts row-level data changes (`INSERT`, `UPDATE`, and `DELETE` operations) into downstream-compatible SQL statements. TiCDC does not rely on the original SQL statements executed on the upstream database. For details, see [how TiCDC processes data changes](/ticdc/ticdc-overview.md#implementation-of-processing-data-changes).
13+
14+
- TiCDC generates logical operations (such as `INSERT`, `UPDATE`, and `DELETE`) equivalent to SQL semantics, rather than restoring the original SQL statements executed on the upstream database one by one. For details, see [how TiCDC processes data changes](/ticdc/ticdc-overview.md#implementation-of-processing-data-changes).
15+
16+
- TiCDC ensures eventual consistency of transactions. With [redo log](/ticdc/ticdc-sink-to-mysql.md#eventually-consistent-replication-in-disaster-scenarios) enabled, TiCDC can guarantee eventual consistency in disaster recovery scenarios. With [Syncpoint](/ticdc/ticdc-upstream-downstream-check.md#enable-syncpoint) enabled, TiCDC supports consistent snapshot reads and data consistency validation.
17+
18+
## Supported downstream systems
19+
20+
TiCDC supports replicating data to various downstream systems, including the following:
21+
22+
- [TiDB database or other MySQL-compatible databases](/ticdc/ticdc-sink-to-mysql.md)
23+
- [Apache Kafka](/ticdc/ticdc-sink-to-kafka.md)
24+
- [Storage services (Amazon S3, GCS, Azure Blob Storage, and NFS)](/ticdc/ticdc-sink-to-cloud-storage.md)
25+
- [Snowflake, ksqlDB, SQL Server via Confluent Cloud integration](/ticdc/integrate-confluent-using-ticdc.md)
26+
- [Apache Flink for consuming Kafka-replicated data](/replicate-data-to-kafka.md)
27+
28+
## Scope of data replication
29+
30+
TiCDC supports the following types of upstream data changes:
31+
32+
+ **Supported:**
33+
34+
- DDL and DML statements (excluding system tables).
35+
- Index operations (`ADD INDEX`, `CREATE INDEX`): to reduce the impact on changefeed replication latency, if the downstream is TiDB, TiCDC [asynchronously executes the `ADD INDEX` and `CREATE INDEX` DDL operations](/ticdc/ticdc-ddl.md#asynchronous-execution-of-add-index-and-create-index-ddls).
36+
- Foreign key constraint DDL statements (`ADD FOREIGN KEY`): TiCDC does **not** replicate upstream system variable settings. You need to manually configure [`foreign_key_checks`](/system-variables.md#foreign_key_checks) in the downstream to determine whether the downstream foreign key constraint check is enabled. TiCDC does **not** validate whether the data complies with foreign key constraints.
37+
38+
+ **Not supported**:
39+
40+
- DDL and DML statements executed in upstream system tables (including `mysql.*` and `information_schema.*`).
41+
- DDL and DML statements executed in upstream temporary tables.
42+
- DQL (Data Query Language) and DCL (Data Control Language) statements.
43+
44+
## Limitations
45+
46+
- TiCDC does not support certain scenarios. For details, see [unsupported scenarios](/ticdc/ticdc-overview.md#unsupported-scenarios).
47+
- TiCDC only verifies the integrity of upstream data changes. It does not validate whether the changes conform to upstream or downstream constraints. If the data violates downstream constraints, TiCDC will return an error when writing to the downstream. For example, TiCDC does **not** perform any foreign key validation.

ticdc/ticdc-overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ summary: Learn what TiCDC is, what features TiCDC provides, and how to install a
55

66
# TiCDC Overview
77

8-
[TiCDC](https://github.com/pingcap/tiflow/tree/master/cdc) is a tool used to replicate incremental data from TiDB. Specifically, TiCDC pulls TiKV change logs, sorts captured data, and exports row-based incremental data to downstream databases.
8+
[TiCDC](https://github.com/pingcap/tiflow/tree/master/cdc) is a tool used to replicate incremental data from TiDB. Specifically, TiCDC pulls TiKV change logs, sorts captured data, and exports row-based incremental data to downstream databases. For detailed data replication capabilities, see [TiCDC Data Replication Capabilities](/ticdc/ticdc-data-replication-capabilities.md).
99

1010
## Usage scenarios
1111

0 commit comments

Comments
 (0)