-
Bug
-
Resolution: Won't Do
-
Blocker
-
None
-
1.3.1.Final, 1.4.0.Final
-
None
-
False
-
False
-
Undefined
-
I have been running the debezium connector in the production environment for a long time, but recently I found a bug.
If CDC is closed in MSSQL during incremental synchronization, Debezium Connector would not throw any exception at this time. Even if I perform the restart operation, the running state of debezium connector seems to be right, but in fact it is not.
Only when the database CDC is closed, kafka connect service will report the following exception:
org.apache.kafka.connect.errors.ConnectException: An exception occurred in the change event producer. This connector will be stopped.org.apache.kafka.connect.errors.ConnectException: An exception occurred in the change event producer. This connector will be stopped. at io.debezium.pipeline.ErrorHandler.setProducerThrowable(ErrorHandler.java:42) at io.debezium.connector.sqlserver.SqlServerStreamingChangeEventSource.execute(SqlServerStreamingChangeEventSource.java:283) at io.debezium.pipeline.ChangeEventSourceCoordinator.streamEvents(ChangeEventSourceCoordinator.java:140) at io.debezium.pipeline.ChangeEventSourceCoordinator.lambda$start$0(ChangeEventSourceCoordinator.java:113) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Invalid object name 'cdc.lsn_time_mapping'. at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:262) at com.microsoft.sqlserver.jdbc.SQLServerResultSet$FetchBuffer.nextRow(SQLServerResultSet.java:5427) at com.microsoft.sqlserver.jdbc.SQLServerResultSet.fetchBufferNext(SQLServerResultSet.java:1758) at com.microsoft.sqlserver.jdbc.SQLServerResultSet.next(SQLServerResultSet.java:1016) at io.debezium.jdbc.JdbcConnection.lambda$singleResultMapper$6(JdbcConnection.java:1296) at io.debezium.jdbc.JdbcConnection.queryAndMap(JdbcConnection.java:635) at io.debezium.jdbc.JdbcConnection.queryAndMap(JdbcConnection.java:503) at io.debezium.connector.sqlserver.SqlServerConnection.getMaxLsn(SqlServerConnection.java:149) at io.debezium.connector.sqlserver.SqlServerStreamingChangeEventSource.execute(SqlServerStreamingChangeEventSource.java:128) ... 7 more[2021-01-08 06:24:02,363] ERROR WorkerSourceTask{id=SPCPemtron_SolderS10B_SqlServerConnector_1-0} Task is being killed and will not recover until manually restarted (org.apache.kafka.connect.runtime.WorkerTask)
The expected situation is that if there is no eligible whitelisted table, the connector should be able to directly fail and exit instead of hiding potential problems.
In addition, I reviewed the code and found that the error level of the following exception is just warn, not fatal. Can the error level be adjusted?
[2021-01-05 07:36:22,022] WARN No whitelisted table has enabled CDC, whitelisted table list does not contain any table with CDC enabled or no table match the white/blacklist filter(s) (io.debezium.connector.sqlserver.SqlServerStreamingChangeEventSource)