From 61b78f08b29b32813731fc54c3cefcc97f03dfaf Mon Sep 17 00:00:00 2001 From: hongyunyan <649330952@qq.com> Date: Thu, 29 May 2025 11:52:16 +0800 Subject: [PATCH 1/2] This is an automated cherry-pick of #21068 Signed-off-by: ti-chi-bot --- ticdc/ticdc-data-replication-capabilities.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ticdc/ticdc-data-replication-capabilities.md b/ticdc/ticdc-data-replication-capabilities.md index 09e96bb40d60a..648436bebf8a6 100644 --- a/ticdc/ticdc-data-replication-capabilities.md +++ b/ticdc/ticdc-data-replication-capabilities.md @@ -34,7 +34,7 @@ TiCDC supports the following types of upstream data changes: - 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. + - 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. Additionally, when writing data to the downstream, TiCDC automatically enables the session-level setting `SET SESSION foreign_key_checks = OFF;`. Therefore, even if global foreign key checks are enabled in the downstream, the data written by TiCDC will not trigger foreign key constraint validation. + **Not supported**: @@ -45,4 +45,10 @@ TiCDC supports the following types of upstream data changes: ## 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. \ No newline at end of file +<<<<<<< HEAD +- 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 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: When a changefeed is configured to filter out all DDL events, if the upstream executes a `DROP COLUMN` operation but continues to write `INSERT` statements involving that column, TiCDC will fail to replicate these DML changes to the downstream because of table schema mismatches. +>>>>>>> 5bc177c304 (ticdc: minor adjust the description of `foreign_key_checks` (#21068)) From 0bdea29529ad4267fd14ec26b8348057e05ee0ae Mon Sep 17 00:00:00 2001 From: lilin90 Date: Thu, 29 May 2025 14:17:59 +0800 Subject: [PATCH 2/2] Update ticdc-data-replication-capabilities.md --- ticdc/ticdc-data-replication-capabilities.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/ticdc/ticdc-data-replication-capabilities.md b/ticdc/ticdc-data-replication-capabilities.md index 648436bebf8a6..0cc5d9b2d5ffa 100644 --- a/ticdc/ticdc-data-replication-capabilities.md +++ b/ticdc/ticdc-data-replication-capabilities.md @@ -45,10 +45,6 @@ TiCDC supports the following types of upstream data changes: ## Limitations - TiCDC does not support certain scenarios. For details, see [unsupported scenarios](/ticdc/ticdc-overview.md#unsupported-scenarios). -<<<<<<< HEAD -- 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 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. +- 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: When a changefeed is configured to filter out all DDL events, if the upstream executes a `DROP COLUMN` operation but continues to write `INSERT` statements involving that column, TiCDC will fail to replicate these DML changes to the downstream because of table schema mismatches. ->>>>>>> 5bc177c304 (ticdc: minor adjust the description of `foreign_key_checks` (#21068))