You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Rui Fan (Jira)" <ji...@apache.org> on 2024/11/13 01:49:00 UTC

[jira] [Commented] (FLINK-36696) JDBC Autoscaler plugin should use DataSource and not connection

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

Rui Fan commented on FLINK-36696:
---------------------------------

Thanks [~dsaisharath] for the report! :)

I checked it just now, it is indeed a wrong way to use it. Would you like to fix it?

> JDBC Autoscaler plugin should use DataSource and not connection
> ---------------------------------------------------------------
>
>                 Key: FLINK-36696
>                 URL: https://issues.apache.org/jira/browse/FLINK-36696
>             Project: Flink
>          Issue Type: Improvement
>          Components: Autoscaler
>            Reporter: Sai Sharath Dandi
>            Priority: Major
>
> The flink-autoscaler-plugin-jdbc uses a single [Connection|https://github.com/apache/flink-kubernetes-operator/blob/main/flink-autoscaler-plugin-jdbc/src/main/java/org/apache/flink/autoscaler/jdbc/state/JdbcStateInteractor.java#L38] to interact with the Database. It is very suboptimal as multiple threads will not be able to query the database concurrently. Instead, we should use a datasource and request for connection from connection pool, each time we need one. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)