dybyte commented on code in PR #9942:
URL: https://github.com/apache/seatunnel/pull/9942#discussion_r2431383660


##########
seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/executor/InsertOrUpdateBatchStatementExecutor.java:
##########
@@ -121,6 +123,8 @@ public void closeStatements() throws SQLException {
             if (!submitted) {
                 executeBatch();
             }
+        } catch (JdbcConnectorException e) {

Review Comment:
   
https://github.com/apache/seatunnel/blob/10c6a6f154731a7b5d0a20f1fa2b4272c0fd6963/seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/JdbcOutputFormat.java#L176-L203
   
   If we don’t handle `JdbcConnectorException` within the `closeStatements()` 
method itself,
   then every method that calls it (such as in JdbcOutputFormat.java) would 
need to handle it separately.
   It seems that this behavior might not have been intentional, as it’s easy to 
overlook that `closeStatements()` can throw this exception.
   Clarifying where this exception should be handled would help improve the 
code’s robustness and maintainability.



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