Open MichaelDrogalis opened 4 years ago
@MichaelDrogalis This issue is not exclusively from KSQL. I reproduced the same thing using the Connector UI from Control Center. I don't know about connectors internals, so not sure if it's related to the Voluble connector or an internal Connect issue?
@spena I verified this behavior with different connectors - same happens with Debezium.
@MichaelDrogalis You reproduced it using the Connect UI or just KSQL? The issue is happening in the Connect side.
I just used ksqlDB for both to verify that it wasn't an issue with one single connector.
@MichaelDrogalis Ok. Try it directly from Connect instead of using ksqlDB. I think this is a Connect issue. I confirmed it happens using their API.
Discussed this offline with the Connect team. This issue is caused by this: https://issues.apache.org/jira/browse/KAFKA-8869
Describe the bug
Uncovered in https://github.com/MichaelDrogalis/voluble/issues/4, it appears that when using embedded Connect, dropping and restarting a connector with a new configuration starts the connector twice. I'd blame my own shotty connector, but I also observed this (via logging in both cases) using the Debezium connector, too.
To Reproduce
Download the Voluble connector and put it in a directory called
voluble
:Then start up the following with Docker Compose:
Then go into the CLI:
And run a simple connector configuration. This one creates exactly 3 records in a topic called
customers
:Check that there are 3 records. This should be work:
Now drop the connector:
And create it again, but this time asking it to create 5 records instead of 3:
If you print the topic again, you'll see that it has 8 additional records (3 from the previous configuration, 5 from the new), for a total of 11 records.
Expected behavior
That there would be 8 records total at the end (3 from the previous configuration, and 5 from the new). Connector-specifics aside, I'd expect the connector to only run once with the newest configuration when it is launched again.