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

after TiDB introduce concurrent DDL, creating mysql database is not written to history DDL #6506

Closed
lance6716 opened this issue Jul 28, 2022 · 2 comments · Fixed by #6485
Closed
Labels
area/ticdc Issues or PRs related to TiCDC. severity/major type/bug The issue is confirmed as a bug.

Comments

@lance6716
Copy link
Contributor

lance6716 commented Jul 28, 2022

What did you do?

MySQL [(none)]> admin show ddl jobs 1000;

What did you expect to see?

MySQL [(none)]> admin show ddl jobs 1000;
+--------+---------+----------------------------------+---------------+--------------+-----------+----------+-----------+---------------------+---------------------+---------------------+--------+
| JOB_ID | DB_NAME | TABLE_NAME                       | JOB_TYPE      | SCHEMA_STATE | SCHEMA_ID | TABLE_ID | ROW_COUNT | CREATE_TIME         | START_TIME          | END_TIME            | STATE  |
+--------+---------+----------------------------------+---------------+--------------+-----------+----------+-----------+---------------------+---------------------+---------------------+--------+
...
|      6 | mysql   | user                             | create table  | public       |         3 |        5 |         0 | 2022-07-28 15:20:50 | 2022-07-28 15:20:50 | 2022-07-28 15:20:50 | synced |
|      4 | mysql   |                                  | create schema | public       |         3 |        0 |         0 | 2022-07-28 15:20:50 | 2022-07-28 15:20:50 | 2022-07-28 15:20:50 | synced |
|      2 | test    |                                  | create schema | public       |         1 |        0 |         0 | 2022-07-28 15:20:50 | 2022-07-28 15:20:50 | 2022-07-28 15:20:50 | synced |
+--------+---------+----------------------------------+---------------+--------------+-----------+----------+-----------+---------------------+---------------------+---------------------+--------+
34 rows in set (0.014 sec)

What did you see instead?

MySQL [(none)]> admin show ddl jobs 1000;
+--------+---------+----------------------------------+---------------+--------------+-----------+----------+-----------+---------------------+---------------------+---------------------+--------+
| JOB_ID | DB_NAME | TABLE_NAME                       | JOB_TYPE      | SCHEMA_STATE | SCHEMA_ID | TABLE_ID | ROW_COUNT | CREATE_TIME         | START_TIME          | END_TIME            | STATE  |
+--------+---------+----------------------------------+---------------+--------------+-----------+----------+-----------+---------------------+---------------------+---------------------+--------+
...
|      5 | mysql   | user                             | create table  | public       |         1 |        4 |         0 | 2022-07-28 15:18:18 | 2022-07-28 15:18:18 | 2022-07-28 15:18:18 | synced |
|      3 | test    |                                  | create schema | public       |         2 |        0 |         0 | 2022-07-28 15:18:18 | 2022-07-28 15:18:18 | 2022-07-28 15:18:18 | synced |
+--------+---------+----------------------------------+---------------+--------------+-----------+----------+-----------+---------------------+---------------------+---------------------+--------+
33 rows in set (0.018 sec)

So CDC's logic about history DDL is not compatible.

Versions of the cluster

Release Version: v6.2.0-alpha-453-g2a9350923
Edition: Community
Git Commit Hash: 2a935092309bb631a5453950f4e5a3f5e0d729a1
Git Branch: HEAD
UTC Build Time: 2022-07-21 07:08:35
GoVersion: go1.18.3
Race Enabled: false
TiKV Min Version: 6.2.0-alpha
Check Table Before Drop: false
Store: unistore

@lance6716
Copy link
Contributor Author

I'm not sure about CDC's execution path, will it really create an empty Snapshot rather than create it from meta? I choose major severity and let other developer decide it.

cc @liuzix @hi-rustin

@jebter
Copy link

jebter commented Jul 29, 2022

/label affects-6.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ticdc Issues or PRs related to TiCDC. severity/major type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants