bs352 commented on code in PR #77:
URL:
https://github.com/apache/flink-connector-jdbc/pull/77#discussion_r1429434411
##########
flink-connector-jdbc/src/main/java/org/apache/flink/connector/jdbc/internal/JdbcOutputFormat.java:
##########
@@ -153,6 +153,16 @@ public void open(int taskNumber, int numTasks) throws
IOException {
if (!closed) {
try {
flush();
+ } catch (FlushingRuntimeException e) {
+ /*
+ * We ignore this
FlushingRuntimeException, as it is
+ * only thrown when
flushingException was assigned to,
+ * in a former run of this
scheduler thread, in the next
+ * catch clause. In that case, we
already have
+ * flushException cached, waiting
for the next task
+ * manager thread's flush call
which would throw a new
+ * FlushingRuntimeException
causing job failure.
Review Comment:
I see, the close method calls flush as well. In this case, the scheduler is
already shutdown before calling flush, so it will never loop.
It won't hurt if we throw the new FlushingRuntimeException here instead, as
it will propagate up to be handled by TaskManager the same way as a regular
RuntimeException.
--
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]