tsreaper commented on a change in pull request #18822:
URL: https://github.com/apache/flink/pull/18822#discussion_r810923071



##########
File path: 
flink-connectors/flink-connector-jdbc/src/main/java/org/apache/flink/connector/jdbc/internal/JdbcOutputFormat.java
##########
@@ -154,7 +154,9 @@ public void open(int taskNumber, int numTasks) throws 
IOException {
                                         try {
                                             flush();
                                         } catch (Exception e) {
-                                            flushException = e;
+                                            if (flushException == null) {

Review comment:
       @2011aad I think you misunderstand what @JingsongLi is suggesting. 
Besides exceptions thrown from `checkFlushException()`, there might also be 
other exceptions just like the first one we caught.
   
   The question is shall we catch and show them all to the user? I'm actually 
against this. Let's imagine the user is faced with a type casting exception 
just like the one in the test case. Each time `flush()` is called the casting 
exception will be thrown once and if there are no records coming we'll have a 
lot of casting exceptions in the suppressed list. This situation is almost the 
same as the one we're currently fixing.




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