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

create table ddl executed too slow when using tidb as the downstream sink #11521

Closed
3AceShowHand opened this issue Aug 23, 2024 · 2 comments · Fixed by #11535
Closed

create table ddl executed too slow when using tidb as the downstream sink #11521

3AceShowHand opened this issue Aug 23, 2024 · 2 comments · Fixed by #11535
Assignees
Labels

Comments

@3AceShowHand
Copy link
Contributor

3AceShowHand commented Aug 23, 2024

What did you do?

run create table ddl on the upstream TiDB.

What did you expect to see?

TiCDC receive and execute ddl should be very quick

What did you see instead?

img_v3_02e1_71b504c8-8e37-4040-a340-2ac72edaa77g

The second log is printed around 23 seconds later after the first one printed.

The root cause is that following query too slow, it may takes more than 20 seconds.

SELECT JOB_ID, JOB_TYPE, SCHEMA_STATE, SCHEMA_ID, TABLE_ID, STATE, QUERY
FROM information_schema.ddl_jobs
WHERE DB_NAME = "%s" 
    AND TABLE_NAME = "%s"
    AND JOB_TYPE LIKE "add index%%"
    AND (STATE = "running" OR STATE = "queueing")
LIMIT 1;
[2024/08/23 18:19:31.924 +08:00] [INFO] [async_ddl.go:165] ["async ddl query success"] [table=test.spmi_transfer_bill206] [duration=23.31010039s]

Versions of the cluster

Upstream TiDB cluster version (execute SELECT tidb_version(); in a MySQL client):

(paste TiDB cluster version here)

Upstream TiKV version (execute tikv-server --version):

(paste TiKV version here)

TiCDC version (execute cdc version):

(paste TiCDC version here)
@3AceShowHand 3AceShowHand added type/bug This is a bug. area/ticdc Issues or PRs related to TiCDC. labels Aug 23, 2024
@3AceShowHand 3AceShowHand self-assigned this Aug 23, 2024
@3AceShowHand 3AceShowHand added affects-8.3 severity/moderate This is a moderate bug. labels Aug 23, 2024
@3AceShowHand
Copy link
Contributor Author

This is introduced by #11476

@lance6716
Copy link
Contributor

lance6716 commented Aug 25, 2024

Maybe the root cause is pingcap/tidb#52905

We are improving the implementation of I_S tables, you can open a feature request to our team if there's no workaround.

@ti-chi-bot ti-chi-bot bot closed this as completed in b999807 Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment