routing: incorrect rule matching and CREATE VIEW rewriting
@3AceShowHand is already working on this.
Since Sep 15, 2026.
- Dominant language
- Go
- Stars
- 56
- Forks
- 63
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 34
Description
What did you do?
Used table routing in TiCDC's new architecture. The following configurations and DDLs expose independent problems:
- Set changefeed
case-sensitive = trueand routeSales.*while the source table issales.orders. - Create a changefeed with an invalid route matcher (
[) and no source tables. - Place a table-only route for
sales.ordersbefore an MQ rule forsales.*with topicsales-eventsand partitionts. - Use
{schema}_{table}with source schemadb{table}and tableorders. - Route
test.*todst.{table}_rand create views usingSELECT t.* FROM torWITH c AS (SELECT id FROM t) SELECT id FROM c.
What did you expect to see?
Routing should honor the changefeed configuration, validate matchers regardless of table count, preserve MQ dispatch behavior and literal source names, and preserve view query results.
What did you see instead?
- The dispatcher uses the sink-level case-sensitivity field, producing different routes from API validation and the maintainer.
- Invalid matchers pass validation when the table set is empty.
- Table-only routing rules shadow MQ rules, changing the topic and partition selection.
- Placeholder substitution processes inserted source text again:
db{table}_ordersbecomesdborders_orders. - Qualified wildcards retain the old table name. CTE references are renamed as physical tables, such as
dst.c_r, causing view creation failures or incorrect results when that physical table exists.
Scope and likelihood
These issues require specific configuration combinations, unusual identifiers, or particular view definitions, so they are expected to be uncommon in typical production use. This assessment is based on the trigger conditions, not measured incident rates. When triggered, they can still cause incorrect routing or interrupt replication.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.