[
https://issues.apache.org/jira/browse/FLINK-19435?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17246309#comment-17246309
]
Jark Wu edited comment on FLINK-19435 at 12/9/20, 6:35 AM:
-----------------------------------------------------------
[~kezhuw], you are right. The current {{PostgresDialect}} implementation is
tied to the specific driver and I think we have to do this if we want to have
better integration with external databases.
Your steps sound good to me. I have assigned this issue to you. Feel free to
create other related issues if needed.
> should JdbcConnectionOptions.driverName be optional from JdbcSink and sql?
I think we can make them optional, at least it is optional for SQL connectors
(by using the default driver name defined in {{JdbcDialect}}).
was (Author: jark):
[~kezhuw], you are right. The current {{PostgresDialect}} implementation is
tied to the specific driver and I think we have to do this if we want to have
better integration with external databases.
Your steps sound good to me. I have assigned this issue to you. Feel free to
create other related issues if needed.
> should JdbcConnectionOptions.driverName be optional from JdbcSink and sql?
I think we can make them optional, at least it is optional for SQL connectors
(by using the default driver name defined in {{JdbcDialect}}).
> 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)