You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] pulsar_sync_table with topic-pattern takes the schema from a topic that does not match #11444
In one Pulsar namespace, create a topic audit_log and a topic orders_1, and write canal-json records with different columns to each.
Start pulsar_sync_table with --pulsar_conf topic-pattern=orders_[0-9]+ so that the table is created from the topic data.
What doesn't meet your expectations?
The table schema is taken from audit_log, a topic that does not match the pattern. With --primary_keys set, the action fails:
IllegalArgumentException: For sink table ..., not all specified primary keys '[pt, _id]' exist in source tables or computed columns '[v0, v1]'.
Without primary keys the table gets audit_log's columns while the job reads orders_1.
PulsarActionUtils.findOneTopic lists the namespace's topics and passes the pattern to the broker only when it ends with .*. It then returns the first topic of the list without matching it against the pattern. The source itself subscribes only to matching topics, as TopicPatternSubscriber filters the same list.
Expected: the schema comes from a topic that matches topic-pattern.
Anything else?
KafkaActionUtils.findOneTopic already matches each topic against the pattern. PulsarDebeziumAvroDeserializationSchema uses the same Pulsar method to pick the schema registry subject.
Activity