-
Bug
-
Resolution: Done
-
Major
-
None
-
None
-
False
-
None
-
False
The method
public SnapshotResult<O> doExecute(ChangeEventSourceContext context, O previousOffset,
SnapshotContext<P, O> snapshotContext, SnapshottingTask snapshottingTask)
swallows any exception that's generated while snapshot if the finally block throws an exception. In the finally block of the method we are doing the following
if (connectionPool != null) {
for (JdbcConnection conn : connectionPool) {
if (!jdbcConnection.equals(conn))
_*
{ conn.close(); }*_
}
}
rollbackTransaction(connection);
This can very well throw an exception (for instance the rollbackTransaction method will throw an exception if the connection is already closed. The connection can be closed if an error occurred during reading of data beforehand. Thus in this case the exception generated by finally block will suppress the original exception and as a result the original exception will be lost.
- links to
-
RHEA-2023:120698 Red Hat build of Debezium 2.3.4 release