whhe commented on code in PR #138:
URL: 
https://github.com/apache/flink-connector-jdbc/pull/138#discussion_r1717847137


##########
flink-connector-jdbc-core/src/main/java/org/apache/flink/connector/jdbc/internal/JdbcOutputFormat.java:
##########
@@ -178,14 +178,12 @@ public synchronized void flush() throws IOException {
                     throw new IOException(e);
                 }
                 try {
-                    if (!connectionProvider.isConnectionValid()) {
-                        updateExecutor(true);
-                    }
+                    updateExecutor(!connectionProvider.isConnectionValid());
                 } catch (Exception exception) {
                     LOG.error(
-                            "JDBC connection is not valid, and reestablish 
connection failed.",
+                            "JDBC connection or prepared statement are not 
valid, and attempt to update the JDBC statement executor failed.",

Review Comment:
   I think the first half can be removed.



-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to