tamirsagi commented on PR #5:
URL:
https://github.com/apache/flink-connector-jdbc/pull/5#issuecomment-2515475756
> @tamirsagi it is basicly the same fix i asked on the Jira Board and they
said i should open up a new PR thats why there are two :) what exactly do you
mean by wrapping it? Do you have some example code?
JdbcOutputFormat#close method add it there
```
if (batchCount > 0) {
try(connectionProvider) { <-- Add this
flush();
} catch (Exception e) {
LOG.warn("Writing records to JDBC failed.", e);
flushException=e;
}
}
```
I find it safer and cleaner.
--
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]