-
Notifications
You must be signed in to change notification settings - Fork 298
ticdc: MySQL sink dispatcher routing #12435
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
base: release-8.5
Are you sure you want to change the base?
Changes from 15 commits
13c8b51
2312089
676be0e
986c4ff
d201848
44cf56b
34e60aa
6c070f2
d418240
d444af7
c8dd505
9d7bb01
7feb4d0
1cf984e
fe61fe8
769181d
f94f22b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -276,6 +276,8 @@ func (c *ReplicaConfig) toInternalReplicaConfigWithOriginConfig( | |
| IndexName: rule.IndexName, | ||
| Columns: rule.Columns, | ||
| TopicRule: rule.TopicRule, | ||
| SchemaRule: rule.SchemaRule, | ||
| TableRule: rule.TableRule, | ||
| }) | ||
| } | ||
| var columnSelectors []*config.ColumnSelector | ||
|
|
@@ -530,6 +532,7 @@ func (c *ReplicaConfig) toInternalReplicaConfigWithOriginConfig( | |
| CheckpointInterval: c.SyncedStatus.CheckpointInterval, | ||
| } | ||
| } | ||
|
|
||
| return res | ||
| } | ||
|
|
||
|
|
@@ -580,6 +583,8 @@ func ToAPIReplicaConfig(c *config.ReplicaConfig) *ReplicaConfig { | |
| IndexName: rule.IndexName, | ||
| Columns: rule.Columns, | ||
| TopicRule: rule.TopicRule, | ||
| SchemaRule: rule.SchemaRule, | ||
| TableRule: rule.TableRule, | ||
| }) | ||
| } | ||
| var columnSelectors []*ColumnSelector | ||
|
|
@@ -854,6 +859,7 @@ func ToAPIReplicaConfig(c *config.ReplicaConfig) *ReplicaConfig { | |
| CheckpointInterval: cloned.SyncedStatus.CheckpointInterval, | ||
| } | ||
| } | ||
|
|
||
| return res | ||
| } | ||
|
|
||
|
|
@@ -994,14 +1000,18 @@ type LargeMessageHandleConfig struct { | |
| ClaimCheckRawValue bool `json:"claim_check_raw_value"` | ||
| } | ||
|
|
||
| // DispatchRule represents partition rule for a table | ||
| // DispatchRule represents dispatch and routing rules for a table. | ||
| // For MQ sinks (Kafka, Pulsar): controls topic and partition assignment. | ||
| // For MySQL/TiDB sinks: controls schema and table name routing. | ||
| // This is a duplicate of config.DispatchRule | ||
| type DispatchRule struct { | ||
| Matcher []string `json:"matcher,omitempty"` | ||
| PartitionRule string `json:"partition,omitempty"` | ||
| IndexName string `json:"index,omitempty"` | ||
| Columns []string `json:"columns,omitempty"` | ||
| TopicRule string `json:"topic,omitempty"` | ||
| SchemaRule string `json:"schema,omitempty"` | ||
| TableRule string `json:"table,omitempty"` | ||
| } | ||
|
Comment on lines
1010
to
1015
|
||
|
|
||
| // ColumnSelector represents a column selector for a table. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will
schema routingfunctionality also works for the MQ Sinks ?