-
Notifications
You must be signed in to change notification settings - Fork 288
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
Support exchange partition in TiCDC #639
Comments
How to test our program? |
Another question. Is it a good way to solve it like this:
I have just started looked at CDC for one hour. If there are some misunderstanding about the workflow, please inform me. |
Could add this DDL in integration test, including case
|
Yep, we should update the schema storage, besides since the |
So the logic is:
BTW, how to implement exchange? Swap the partition id with source table ID? (here ID works like a pointer). We just need to update the schema in CDC cluster right? The Job will be generated for us and sink will responsible for downstream consistency. |
Hi @amyangfei , I have started to code on the most simple case.
But I realize that it may not be the case that: I can not get the partition id of source table if it is not a partition table. So should I somehow change it to a partition table? If so, how to do it? |
|
|
The case-2 (target table and source table in different captures) is a little complicated, seems |
Thanks for answering. But still goes my questions:
|
|
So source table will not have multiple partitions. This kind of restriction is done by upstream logic. But we should transform it into a partition right? Cuz after DDL it becomes partition part of target table. Or table ID is also partition ID? I'm not so sure about table ID and partition ID. For example, a partition table ID is 3, its partitions are [1, 2, 4, 5, 6]. Is it ok? |
When I write the code for re-constructing tableInfo, I realize that source tableInfo don't need to be reconstruct. It is not a partition table (so we don't need to care about partition change?) and it has been wrapped with DB info. Is it the right way? |
yes, the source table keeps a normal table |
I got questions on this post.
|
You can refer to this document how to run tests in TiCDC |
Now I was working on applyJob logic for this feature.
it is different from schemaStorage, we don't need to get source table id and target table id because source table is not a partition table. pr update: #718 |
Yes, both step 1 and step are correct.
|
new pr #718 . I wrote it too fast so it's possible to be buggy. But it should express my idea in some extend. (Maybe I should change function name because I found a rebalanceTables() method in changefeed) |
close by #7118 |
Feature Request
Is your feature request related to a problem? Please describe:
pingcap/tidb#17149 introduces a new DDL
The partition table(in target table) id and source table id will be exchanged.
TableInfo
injob.BinlogInfo
records the new table info oftarget_table
Describe the feature you'd like:
Teachability, Documentation, Adoption, Migration Strategy:
TiCDC should compare the old table info with the new table info of
target_table
, and found the exchangedpartition table id
andsource table id
The text was updated successfully, but these errors were encountered: