Hi!

Thanks for reporting this issue. This flushException field is to record the
exception from the timer thread and will fail the job once the main thread
discovers its existence. I've created a jira ticket [1] about this issue
and you can check the progress there.

[1] https://issues.apache.org/jira/browse/FLINK-24677

Hameed Masarwa <[email protected]> 于2021年10月28日周四 上午2:48写道:

> I am using flink-connector-jdbc 1.12.2
>
> When the flink fails to write records to the database, as a result of some
> connection failure, then the exception thrown contains an almost 5000 of
> the following circular causes:
>
>
>
> Caused by: java.lang.RuntimeException: Writing records to JDBC failed.
>
>               at
> org.apache.flink.connector.jdbc.internal.JdbcBatchingOutputFormat.checkFlushException(JdbcBatchingOutputFormat.java:154)
> ~[blob_p-388afb5a40add54a38cd54f9bee725a00be5f450-fa518baa6889bb6be0f5967e4be54ec9:?]
>
>               at
> org.apache.flink.connector.jdbc.internal.JdbcBatchingOutputFormat.writeRecord(JdbcBatchingOutputFormat.java:160)
> ~[blob_p-388afb5a40add54a38cd54f9bee725a00be5f450-fa518baa6889bb6be0f5967e4be54ec9:?]
>
>               at
> org.apache.flink.connector.jdbc.internal.GenericJdbcSinkFunction.invoke(GenericJdbcSinkFunction.java:54)
> ~[blob_p-388afb5a40add54a38cd54f9bee725a00be5f450-fa518baa6889bb6be0f5967e4be54ec9:?]
>
>
>
>
>
> When looking at the code, in JdbcBatchingOutputFormat class, it seems like
> the checkFlushException() throws a new RuntimeExpetion while concatenating
> the previous saved flushException (as a cause) to it.
>
> Then the result exception will be thrown and saved as a new
> flushException, and so on.
>
>
>
> *private void *checkFlushException() {
>     *if *(*this*.*flushException *!= *null*) {
>         *throw new *RuntimeException(*"Writing records to JDBC failed."*,
> *this*.*flushException*);
>     }
> }
>
>
>
> Is this a known issue? Is there a way to work around it?
>
>
>
> Thanks,
>
> Hameed
>
>
>
>
>
>
> Confidentiality: This communication and any attachments are intended for
> the above-named persons only and may be confidential and/or legally
> privileged. Any opinions expressed in this communication are not
> necessarily those of NICE Actimize. If this communication has come to you
> in error you must take no action based on it, nor must you copy or show it
> to anyone; please delete/destroy and inform the sender by e-mail
> immediately.
> Monitoring: NICE Actimize may monitor incoming and outgoing e-mails.
> Viruses: Although we have taken steps toward ensuring that this e-mail and
> attachments are free from any virus, we advise that in keeping with good
> computing practice the recipient should ensure they are actually virus free.
>

Reply via email to