Khokhlov Pavel created FLINK-17488:
--------------------------------------

             Summary: JdbcSink has to support setting auto-commit mode of DB
                 Key: FLINK-17488
                 URL: https://issues.apache.org/jira/browse/FLINK-17488
             Project: Flink
          Issue Type: Improvement
          Components: Connectors / JDBC
    Affects Versions: 1.10.0
            Reporter: Khokhlov Pavel


Just played with new
{noformat}
org.apache.flink.api.java.io.jdbc.JdbcSink{noformat}
({{1.11-SNAPSHOT)}}

And batch mode with mysql driver.

Noticed that *JdbcSink* supports only *autoCommit true* and developer cannot 
change that behaviour. But it's very important from Transactional and 
Performance point of view to support autoCommit {color:#00875a}*false* 
{color:#172b4d}and call commit explicitly. ** {color}{color}

 ** When a connection is created, it is in auto-commit mode. This means that 
each individual SQL statement is treated as a transaction and is automatically 
committed right after it is executed.

For example Confluent connector disable it by default.

https://github.com/confluentinc/kafka-connect-jdbc/blob/da9619af1d7442dd91793dbc4dc65b8e7414e7b5/src/main/java/io/confluent/connect/jdbc/sink/JdbcDbWriter.java#L50

 



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

Reply via email to