Skip to content
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

ticdc: add wait async ddl description #18500

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
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
2 changes: 2 additions & 0 deletions ticdc/ticdc-ddl.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ summary: 了解 TiCDC 支持同步的 DDL 和一些特殊情况

为了减小对 Changefeed 同步延迟的影响,如果下游是 TiDB,TiCDC 会异步执行创建和添加索引的 DDL 操作,即 TiCDC 将 `ADD INDEX` 和 `CREATE INDEX` DDL 同步到下游执行后,会立刻返回,而不会等待 DDL 操作完成。这样可以避免阻塞后续的 DML 执行。

当 `ADD INDEX` 和 `CREATE INDEX` DDL 在下游执行期间,TiCDC 执行同一张表的下一条 DDL 时,可能因为新的 DDL 长期被阻塞在 queueing 状态导致重复执行同一条 DDL,重试时间过长时还会导致同步任务失败。从 v8.3.0 开始,如果 TiCDC 拥有下游数据库的 `SUPER` 权限,TiCDC 可以通过 `ADMIN SHOW DDL JOBS` 查询异步执行的 DDL 任务的状态,直到索引创建完成后再继续同步,这期间同步任务的延迟会上升,但避免了同步任务失败。
CharlesCheung96 marked this conversation as resolved.
Show resolved Hide resolved

> **注意:**
>
> - 如果下游 DML 的执行依赖于未完成同步的索引,DML 可能会执行得很慢,进而影响 TiCDC 的同步延迟。
Expand Down