[ 
https://issues.apache.org/jira/browse/FLINK-19435?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17245593#comment-17245593
 ] 

Kezhu Wang commented on FLINK-19435:
------------------------------------

{quote}
Do you have use cases that show switching different drivers is useful?
{quote}

No, just a paranoid hypothesis that client may use different drivers for one 
dialect in one stream, I am not sure whether this is an reasonable use case. 
Personally, I tend to drop {{driverName}} as the de-facto one-to-one binding 
among dialect and driver implementation, it will also simplify things. But I am 
kind of worry about whether driver class customization was desired in current 
design as [~lzljs3620320] checked in.

> 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.13.0, 1.12.1
>
>         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)

Reply via email to