velo commented on code in PR #279:
URL: 
https://github.com/apache/flink-connector-jdbc/pull/279#discussion_r4788144199


##########
flink-connector-jdbc-core/src/main/java/org/apache/flink/connector/jdbc/core/datastream/sink/writer/JdbcWriter.java:
##########
@@ -218,7 +218,6 @@ public void close() throws Exception {
         } else {
             // don't jdbcOutput.close(); as we don't want neither to flush nor 
to close connection
             // here
-            this.jdbcOutput.checkFlushException();
             this.jdbcTransaction.close();

Review Comment:
   Done in 6f6c6f0.



##########
flink-connector-jdbc-core/src/main/java/org/apache/flink/connector/jdbc/internal/JdbcOutputFormat.java:
##########
@@ -229,12 +232,7 @@ public synchronized void close() {
             }
 
             if (batchCount > 0) {
-                try {
-                    flush();
-                } catch (Exception e) {
-                    LOG.warn("Writing records to JDBC failed.", e);
-                    throw new RuntimeException("Writing records to JDBC 
failed.", e);
-                }
+                LOG.warn("Closing the JDBC writer with {} unflushed records.", 
batchCount);

Review Comment:
   Done in f8c722f.



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