[
https://issues.apache.org/jira/browse/FLINK-35349?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Yanquan Lv updated FLINK-35349:
-------------------------------
Fix Version/s: (was: cdc-3.4.0)
> Use connection in openJdbcConnection of
> SqlServerDialect/Db2Dialect/OracleDialect
> ---------------------------------------------------------------------------------
>
> Key: FLINK-35349
> URL: https://issues.apache.org/jira/browse/FLINK-35349
> Project: Flink
> Issue Type: Improvement
> Components: Flink CDC
> Affects Versions: cdc-3.1.0
> Reporter: Hongshun Wang
> Priority: Minor
>
> Current, some dialect's `openJdbcConnection` create connection without
> connection pool. It means that will create a new connection each time.
> Howver , openJdbcConnection is used in generateSplits now, which means that
> enumerator will create a new connection for once split. A big table will
> create connection again and again.
> {code:java}
> public Collection<SnapshotSplit> generateSplits(TableId tableId) {
> try (JdbcConnection jdbc = dialect.openJdbcConnection(sourceConfig)) {
> LOG.info("Start splitting table {} into chunks...", tableId);
> long start = System.currentTimeMillis();
> Table table =
> Objects.requireNonNull(dialect.queryTableSchema(jdbc,
> tableId)).getTable();
> Column splitColumn = getSplitColumn(table,
> sourceConfig.getChunkKeyColumn());
> final List<ChunkRange> chunks; {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)