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

Ignore lossy DDL change for TiCDC #43227

Closed
Rustin170506 opened this issue Apr 20, 2023 · 3 comments · Fixed by #43232
Closed

Ignore lossy DDL change for TiCDC #43227

Rustin170506 opened this issue Apr 20, 2023 · 3 comments · Fixed by #43232
Labels
affects-6.5 affects-7.1 type/enhancement The issue or PR belongs to an enhancement.

Comments

@Rustin170506
Copy link
Member

Enhancement

What is lossy DDL and why do we need to special handle it?

Lossy DDL means we execute a DDL which changes the data type. For example:
Create table:

CREATE TABLE movies(title VARCHAR(50) NOT NULL,
genre VARCHAR(30) NOT NULL,director VARCHAR(60) NOT NULL,
release_year INT NOT NULL,PRIMARY KEY(title));

Notice the current length of the genre is VARCHAR(30). If you do an alter:

ALTER TABLE movies MODIFY COLUMN genre VARCHAR(20)

You changed the length from 30 to 20. This is a lossy DDL, it would cause the full amount of data to change.

Also, it causes the TiCDC to spend a lot of resources on handling these data changes from TiCDC. But maybe the users don't care about these changes. They only want to get the right DDL to notice that the data type of this column was changed.

See more at: Needs Analysis For Optimizing Lossy DDL Synchronization Process and Solution For Optimizing Lossy DDL in TiCDC

@nongfushanquan
Copy link

/label affects-7.1

@nongfushanquan
Copy link

/area ticdc

@nongfushanquan
Copy link

/label affects-6.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-6.5 affects-7.1 type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants