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

ASF GitHub Bot updated FLINK-35524:
-----------------------------------
    Labels: pull-request-available  (was: )

> Clear connections pools when reader exist.
> ------------------------------------------
>
>                 Key: FLINK-35524
>                 URL: https://issues.apache.org/jira/browse/FLINK-35524
>             Project: Flink
>          Issue Type: Bug
>          Components: Flink CDC
>    Affects Versions: cdc-3.1.1
>            Reporter: Hongshun Wang
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: cdc-3.2.0
>
>
> Current, inJdbcConnectionPools is static instance, so the datasource pools in 
> it won't be recycle when reader close. It will cause memory leak.
> ```java
> public class JdbcConnectionPools implements ConnectionPools<HikariDataSource, 
> JdbcSourceConfig> {
> private static final Logger LOG = 
> LoggerFactory.getLogger(JdbcConnectionPools.class);
> private static JdbcConnectionPools instance;
> private final Map<ConnectionPoolId, HikariDataSource> pools = new HashMap<>();
> private static final Map<String, JdbcConnectionPoolFactory> POOL_FACTORY_MAP 
> = new HashMap<>();
> ```



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

Reply via email to