Details
-
Bug
-
Resolution: Not a Bug
-
Major
-
None
-
0.10.0.Beta4
-
None
Description
With Postgresql-connector, if we force stop the connector during the Snaphost process, tables are still locked and we can't restart the connector (timeout occured while trying to relock the tables and the locks must be manually removed from the Postgresql db). I think it is a regression as the behaviour was not the same with some previous versions (but maybe I am wrong...).
2019-08-21 14:35:39.400 ERROR 20546 --- [pool-1-thread-1] io.debezium.embedded.EmbeddedEngine : Error while trying to run connector class 'io.debezium.connector.postgresql.PostgresConnector' org.apache.kafka.connect.errors.ConnectException: An exception ocurred in the change event producer. This connector will be stopped. at io.debezium.connector.base.ChangeEventQueue.throwProducerFailureIfPresent(ChangeEventQueue.java:170) ~[debezium-core-0.10.0.Beta4.jar:0.10.0.Beta4] at io.debezium.connector.base.ChangeEventQueue.poll(ChangeEventQueue.java:151) ~[debezium-core-0.10.0.Beta4.jar:0.10.0.Beta4] at io.debezium.connector.postgresql.PostgresConnectorTask.poll(PostgresConnectorTask.java:188) ~[debezium-connector-postgres-0.10.0.Beta4.jar:0.10.0.Beta4] at io.debezium.embedded.EmbeddedEngine.run(EmbeddedEngine.java:814) ~[debezium-embedded-0.10.0.Beta4.jar:0.10.0.Beta4] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[na:1.8.0_212] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[na:1.8.0_212] at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_212] Caused by: java.lang.RuntimeException: org.postgresql.util.PSQLException: ERROR: canceling statement due to lock timeout at io.debezium.relational.RelationalSnapshotChangeEventSource.execute(RelationalSnapshotChangeEventSource.java:179) ~[debezium-core-0.10.0.Beta4.jar:0.10.0.Beta4] at io.debezium.pipeline.ChangeEventSourceCoordinator.lambda$start$0(ChangeEventSourceCoordinator.java:83) ~[debezium-core-0.10.0.Beta4.jar:0.10.0.Beta4] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[na:1.8.0_212] at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_212] ... 3 common frames omitted Caused by: org.postgresql.util.PSQLException: ERROR: canceling statement due to lock timeout at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2440) ~[postgresql-42.2.5.jar:42.2.5] at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2183) ~[postgresql-42.2.5.jar:42.2.5] at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:308) ~[postgresql-42.2.5.jar:42.2.5] at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:441) ~[postgresql-42.2.5.jar:42.2.5] at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:365) ~[postgresql-42.2.5.jar:42.2.5] at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:307) ~[postgresql-42.2.5.jar:42.2.5] at org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:293) ~[postgresql-42.2.5.jar:42.2.5] at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:270) ~[postgresql-42.2.5.jar:42.2.5] at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:266) ~[postgresql-42.2.5.jar:42.2.5] at io.debezium.jdbc.JdbcConnection.executeWithoutCommitting(JdbcConnection.java:1125) ~[debezium-core-0.10.0.Beta4.jar:0.10.0.Beta4] at io.debezium.connector.postgresql.PostgresSnapshotChangeEventSource.lockTablesForSchemaSnapshot(PostgresSnapshotChangeEventSource.java:98) ~[debezium-connector-postgres-0.10.0.Beta4.jar:0.10.0.Beta4] at io.debezium.relational.RelationalSnapshotChangeEventSource.execute(RelationalSnapshotChangeEventSource.java:133) ~[debezium-core-0.10.0.Beta4.jar:0.10.0.Beta4]