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

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

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

Jark Wu updated FLINK-19435:
----------------------------
    Description: 
when we sink data to multi jdbc outputformat , 

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

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

  was:
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.


> 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
>            Priority: Major
>             Fix For: 1.10.3
>
>         Attachments: image-2020-10-09-20-48-48-261.png, image-2020-10-09-20-49-23-644.png
>
>
> when we sink data to multi jdbc outputformat , 
> {code}
> protected void establishConnection() throws SQLException, ClassNotFoundException {
>  Class.forName(drivername);
>  if (username == null) {
>  connection = DriverManager.getConnection(dbURL);
>  } else {
>  connection = DriverManager.getConnection(dbURL, username, password);
>  }
> }
> {code}
> may cause jdbc driver deadlock. it need to change to synchronized function.



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