Skip to content

ticdc: add new doc for TiCDC data replication capabilities #20967

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 20 commits into from
May 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions TOC.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@
- [Integrate with Apache Kafka and Apache Flink](/replicate-data-to-kafka.md)
- Reference
- [TiCDC Architecture](/ticdc/ticdc-architecture.md)
- [TiCDC Data Replication Capabilities](/ticdc/ticdc-data-replication-capabilities.md)
- [TiCDC Server Configurations](/ticdc/ticdc-server-config.md)
- [TiCDC Changefeed Configurations](/ticdc/ticdc-changefeed-config.md)
- [TiCDC Client Authentication](/ticdc/ticdc-client-authentication.md)
Expand Down
48 changes: 48 additions & 0 deletions ticdc/ticdc-data-replication-capabilities.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
title: TiCDC Data Replication Capabilities
summary: Learn the data replication capabilities of TiCDC.
---

# TiCDC Data Replication Capabilities

[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.

## How TiCDC works

- 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).

- 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).

- 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.

## Supported downstream systems

TiCDC supports replicating data to various downstream systems, including the following:

- [TiDB database or other MySQL-compatible databases](/ticdc/ticdc-sink-to-mysql.md)
- [Apache Kafka](/ticdc/ticdc-sink-to-kafka.md)
- [Message Queue (MQ)-type sinks](/ticdc/ticdc-changefeed-config.md#sink), such as [Pulsar](/ticdc/ticdc-sink-to-pulsar.md)
- [Storage services (Amazon S3, GCS, Azure Blob Storage, and NFS)](/ticdc/ticdc-sink-to-cloud-storage.md)
- [Snowflake, ksqlDB, SQL Server via Confluent Cloud integration](/ticdc/integrate-confluent-using-ticdc.md)
- [Apache Flink for consuming Kafka-replicated data](/replicate-data-to-kafka.md)

## Scope of data replication

TiCDC supports the following types of upstream data changes:

+ **Supported:**

- DDL and DML statements(excluding system tables).
- 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).
- 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.

+ **Not supported**:

- DDL and DML statements executed in upstream system tables (including `mysql.*` and `information_schema.*`).
- DDL and DML statements executed in upstream temporary tables.
- DQL (Data Query Language) and DCL (Data Control Language) statements.

## Limitations​

- TiCDC does not support certain scenarios. For details, see [unsupported scenarios](/ticdc/ticdc-overview.md#unsupported-scenarios).
- 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.
2 changes: 1 addition & 1 deletion ticdc/ticdc-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ aliases: ['/docs/dev/ticdc/ticdc-overview/','/docs/dev/reference/tools/ticdc/ove

# TiCDC Overview

[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.
[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).

## Usage scenarios

Expand Down