DanielLeens commented on code in PR #12736:
URL: https://github.com/apache/seatunnel/pull/12736#discussion_r4562549176
##########
seatunnel-connectors-v2/connector-cdc/connector-cdc-base/src/main/java/org/apache/seatunnel/connectors/cdc/base/source/reader/IncrementalSourceReader.java:
##########
@@ -110,6 +110,23 @@ public IncrementalSourceReader(
this.debeziumDeserializationSchema = debeziumDeserializationSchema;
}
+ /**
+ * Closes the reader and any deserialization schema that holds a resource,
such as the Oracle
+ * LOB re-select connection.
+ */
+ @Override
+ public void close() {
+ try {
+ if (debeziumDeserializationSchema instanceof AutoCloseable) {
+ ((AutoCloseable) debeziumDeserializationSchema).close();
+ }
+ } catch (Exception e) {
Review Comment:
Thanks @nzw921rx. The cleanup ordering in this head already guarantees the
parent cleanup: `IncrementalSourceReader.close()` puts `super.close()` in
`finally` (lines 116-127), so a deserialization-schema close exception does not
prevent `SourceReaderBase.close()` from closing the split fetcher manager
(lines 157-164). Logging instead of throwing is therefore not needed to make
that particular cleanup happen. Retaining a failure signal also avoids
reporting a successful close when schema cleanup failed. If both closes fail,
preserving the original exception with the second suppressed would be a
separate diagnostic improvement; I am not adding a new merge blocker on this
unchanged head. This is a targeted source check, not runtime validation.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]