-
Notifications
You must be signed in to change notification settings - Fork 289
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
ddl_puller(ticdc): discard DDLs that irrelevant with changefeed #6446
Conversation
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
/run-integration-tests |
Codecov Report
Additional details and impacted files
Flags with carried forward coverage won't be shown. Click here to find out more. @@ Coverage Diff @@
## master #6446 +/- ##
================================================
+ Coverage 59.9224% 59.9283% +0.0058%
================================================
Files 783 789 +6
Lines 89519 90121 +602
================================================
+ Hits 53642 54008 +366
- Misses 31168 31369 +201
- Partials 4709 4744 +35 |
/run-integration-tests |
1 similar comment
/run-integration-tests |
/run-integration-tests |
/run-integration-tests |
/run-integration-tests |
/run-all-tests |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 0d5272f
|
@asddongmen: Your PR was out of date, I have automatically updated it for you. At the same time I will also trigger all tests for you: /run-all-tests If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
/run-leak-tests |
2 similar comments
/run-leak-tests |
/run-leak-tests |
What problem does this PR solve?
Issue Number: ref #6447 #3607
What is changed and how it works?
After this PR, TiCDC filters out DDLs that are not related to changefeed in
ddl_puller
, which can reduces the latency and memory consumption of replicating DDLs.It is worth noting that before this PR, for
rename table
DDL, cdc will filter it with the new table name. After this PR, cdc will filterrename table
by its old table name, which is more in line with the semantics of the filter rule.And, if the user wants to rename a table with an old table name that does not match filter.rule to a new table name that matches filter.rule, then an error will be reported directly.
For example, we have
filter.rule = ['test.t1']
, and there are tables nametest.t11
in the upstream TiDB:rename table 'test.t11' to 'test.t1'
will report an error.In addition, if you rename multiple tables in a single one
rename table
DDL, TiCDC will apply the rule mention above to every single subordinaterename table
DDL jobs.For example, we have
filter.rule = ['test.t1',
test.t3]
, and there are tables nametest.t1
,test.t2
in the upstream TiDB:rename table 'test.t1' to 'test.t11', 'test.t2' to 'test.t22'
, therename table 'test.t1'
will be replicated and 'test.t2' to 'test.t22'will be filtered out since
test.t1match
filter.rulebut
test.t2` does not.rename table 'test.t2' to 'test.t3', 'test.t1' to 'test.t11'
will report an error, sincetest.t2
does not matchfilter.rule
buttest.t3
does, TiCDC do not allow such behavior.Check List
Tests
filter.rule = ['test1.t1', 'test1.t2', 'test1.t3', 'test1.t4']
rename table t1 to t11
(replicated)rename table t11 to t1
(error)rename table t2 to t22, t3 to t33
(replicated)rename table t22 to t222, t33 to t333
(discard)rename table t222 to t2, t333 to t3
(error)rename table t4 to t44, t5 to t55
It will be splited into two parts, the
rename table t4 to t44
part is replicated andt5 to t55
is ignored.You can learn more discussion detail in this internal doc: https://pingcap.feishu.cn/wiki/wikcnJ6SaB5cGLeG5OrM4nf6MPg
Questions
Will it cause performance regression or break compatibility?
Do you need to update user documentation, design documentation or monitoring documentation?
Release note