nzw921rx commented on code in PR #12736:
URL: https://github.com/apache/seatunnel/pull/12736#discussion_r4551345881


##########
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:
   I think we can just log a warning here instead of throwing a 
`RuntimeException`, so the other resources can still be closed.



-- 
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]

Reply via email to