-
Notifications
You must be signed in to change notification settings - Fork 23
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
Bugfixes #99
base: master
Are you sure you want to change the base?
Bugfixes #99
Conversation
Currently if any config option starts with `topic.` prefix, the connector will attempt to match it against regular expression for TopicWiseConfigs. If it fails then whole connector fails to start. This is a problem when launching on Confluent Cloud which adds for example `topic.creation.default.max.message.bytes` config. It mistakenly gets through the first check because it starts with `topic.` and then trips up on regular expression. It seems there could be many more configs like this that pertain to Kafka topic but are not this connectors TopicWiseConfigs. Adding suffix check should be sufficient and it should not break existing configurations as long as those adhered to the existing documentation.
If user sets connector up in schemaless mode and forgets to create the table, the connector tasks will fail with NullPointerException. Added warning should make it more obvious as to what is the issue. I am not adding throw here just in case there exists a situation where table creation could lag behind. Connector should continue working normally after the table is created.
@Bouncheck , could you please specify what bug does it fix |
The bug is collision between config names. We have our own pattern for extra configs which wrongly matches some more general configs added by some Kafka platforms. There is more details inside commit message. |
@@ -62,6 +64,10 @@ public class ScyllaDbSinkConnectorConfig extends AbstractConfig { | |||
private static final Pattern TOPIC_KS_TABLE_SETTING_PATTERN = | |||
Pattern.compile("topic\\.([a-zA-Z0-9._-]+)\\.([^.]+|\"[\"]+\")\\.([^.]+|\"[\"]+\")\\.(mapping|consistencyLevel|ttlSeconds|deletesEnabled)$"); | |||
|
|||
private static final String[] TOPIC_WISE_CONFIGS_VALID_SUFFIXES = {".mapping",".consistencyLevel",".ttlSeconds",".deletesEnabled"}; |
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.
Could you please add some comments that briefly explains what this const is
One bugfix for config parsing and one additional logging.