Details
-
Bug
-
Resolution: Obsolete
-
Major
-
None
-
0.9.5.Final
-
None
Description
When a snapshot is in progress and is terminated prematurely then the snapshot reader can end-up in exception.
The problem is that io.debezium.connector.mysql.MySqlConnectorTask.completeReaders() closes JDBC connection on shutdown. The connection can still be in use in Snapshot reader
if (interrupted.get() || !isRunning()) { // We were interrupted or were stopped while reading the tables, // so roll back the transaction and return immediately ... logger.info("Step {}: rolling back transaction after abort", step++); mysql.connection().rollback(); metrics.snapshotAborted(); rolledBack = true; }
and at time when rollback is going to be executed the new connection is created instead that ends up in exception.