-
Notifications
You must be signed in to change notification settings - Fork 28
Description
Currently, when TiCDC outputs data to MQ downstream using open protocol or simple protocol, the message includes the logical table ID for partitioned tables instead of the physical table ID.
This causes inconsistencies, since downstream consumers expect the physical table ID to correctly distinguish partitions.
After review, we found that in our codebase, all TableInfo representing a physical table (rather than a logical table) should carry the physical table ID. However, this is not handled properly right now.
To fix this, we should update the following places to ensure the physical table ID is set correctly:
• persist_storage_ddl_handlers.go:
• extractTableInfoFunc
• buildDDLEventFunc
Expected Behavior:
• All TableInfo instances representing physical tables should have their physical table ID set.
• Output to MQ downstream (open protocol / simple protocol) should contain the correct physical table ID.
Impact:
• Downstream consumers may misinterpret partitioned table events because of incorrect table ID usage.
Next Steps:
• Update the logic in extractTableInfoFunc and buildDDLEventFunc to ensure physical table IDs are always correctly set for physical tables.