[jira] [Created] (FLINK-19435) jdbc JDBCOutputFormat open function invoke Class.forName(drivername)

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (FLINK-19435) jdbc JDBCOutputFormat open function invoke Class.forName(drivername)

Shang Yuanchun (Jira)
xiaodao created FLINK-19435:
-------------------------------

             Summary: jdbc JDBCOutputFormat open function invoke Class.forName(drivername)
                 Key: FLINK-19435
                 URL: https://issues.apache.org/jira/browse/FLINK-19435
             Project: Flink
          Issue Type: Improvement
          Components: Connectors / JDBC
    Affects Versions: 1.10.2
            Reporter: xiaodao
             Fix For: 1.10.3


when we sink data to multi jdbc outputformat , 

```

protected void establishConnection() throws SQLException, ClassNotFoundException {
 Class.forName(drivername);
 if (username == null) {
 connection = DriverManager.getConnection(dbURL);
 } else {
 connection = DriverManager.getConnection(dbURL, username, password);
 }
}

```

may cause jdbc driver deadlock. it need to change to synchronized function.



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