Leonard Xu created FLINK-16281: ---------------------------------- Summary: parameters '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 Fix For: 1.10.1, 1.11.0
parameters '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)