You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Leonard Xu (Jira)" <ji...@apache.org> on 2020/02/26 01:22:00 UTC

[jira] [Updated] (FLINK-16281) parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink

     [ https://issues.apache.org/jira/browse/FLINK-16281?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leonard Xu updated FLINK-16281:
-------------------------------
    Summary: parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink  (was: parameters 'maxRetryTimes' can not work in JDBCUpsertTableSink)

> parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink
> -------------------------------------------------------------
>
>                 Key: FLINK-16281
>                 URL: https://issues.apache.org/jira/browse/FLINK-16281
>             Project: Flink
>          Issue Type: Bug
>          Components: Table SQL / Ecosystem
>    Affects Versions: 1.10.0
>            Reporter: Leonard Xu
>            Priority: Major
>             Fix For: 1.10.1, 1.11.0
>
>
> parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink,
> because PreparedStatement will clear batchedArgs info after first 
> call function executeBatchInternal() as follows:
>  
> {code:java}
> //com.mysql.jdbc.PreparedStatement
> finally {
>     this.statementExecuting.set(false);
>     clearBatch();
> }
> // clearBatch() function implement
> public void clearBatch() throws SQLException {
>  synchronized (checkClosed().getConnectionMutex()) {
>  if (this.batchedArgs != null) {
>  this.batchedArgs.clear();
>  }
>  }
> }
> {code}
> and the next time to call function executeBatchInternal() can not go on because this piece code:
> {code:java}
> //com.mysql.jdbc.PreparedStatement
> if (this.batchedArgs == null || this.batchedArgs.size() == 0) {
>     return new long[0];
> }
> {code}
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)