This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-4.1
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-4.1 by this push:
new 48bfd042142 branch-4.1: [Improve](job) update flink cdc version for
streaming job #62212 (#62430)
48bfd042142 is described below
commit 48bfd042142d9b1fc4063704bc67acbd858dbe6a
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Wed Apr 15 10:08:20 2026 +0800
branch-4.1: [Improve](job) update flink cdc version for streaming job
#62212 (#62430)
Cherry-picked from #62212
Co-authored-by: wudi <[email protected]>
---
.../job/offset/jdbc/JdbcSourceOffsetProvider.java | 4 +-
fs_brokers/cdc_client/pom.xml | 5 +-
.../source/PostgresConnectionPoolFactory.java | 58 ----------------------
3 files changed, 4 insertions(+), 63 deletions(-)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/job/offset/jdbc/JdbcSourceOffsetProvider.java
b/fe/fe-core/src/main/java/org/apache/doris/job/offset/jdbc/JdbcSourceOffsetProvider.java
index 245429ac357..f6bbdcc5b56 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/job/offset/jdbc/JdbcSourceOffsetProvider.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/job/offset/jdbc/JdbcSourceOffsetProvider.java
@@ -431,9 +431,7 @@ public class JdbcSourceOffsetProvider implements
SourceOffsetProvider {
protected List<SnapshotSplit> recalculateRemainingSplits(
Map<String, Map<String, Map<String, String>>>
chunkHighWatermarkMap,
Map<String, List<SnapshotSplit>> snapshotSplits) {
- if (this.finishedSplits == null) {
- this.finishedSplits = new ArrayList<>();
- }
+ this.finishedSplits = new ArrayList<>();
for (Map.Entry<String, Map<String, Map<String, String>>> entry :
chunkHighWatermarkMap.entrySet()) {
String tableId = entry.getKey();
Map<String, Map<String, String>> splitIdToHighWatermark =
entry.getValue();
diff --git a/fs_brokers/cdc_client/pom.xml b/fs_brokers/cdc_client/pom.xml
index afa186844b7..0cad089c98c 100644
--- a/fs_brokers/cdc_client/pom.xml
+++ b/fs_brokers/cdc_client/pom.xml
@@ -63,6 +63,7 @@ under the License.
<properties>
<spring.version>3.5.7</spring.version>
<flink.version>1.20.3</flink.version>
+ <flink.cdc.version>3.6.0-1.20</flink.cdc.version>
<slf4j.version>1.7.36</slf4j.version>
<doris.version>1.2-SNAPSHOT</doris.version>
<spotless.version>2.43.0</spotless.version>
@@ -118,12 +119,12 @@ under the License.
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-connector-mysql-cdc</artifactId>
- <version>3.5.0</version>
+ <version>${flink.cdc.version}</version>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-connector-postgres-cdc</artifactId>
- <version>3.5.0</version>
+ <version>${flink.cdc.version}</version>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
diff --git
a/fs_brokers/cdc_client/src/main/java/org/apache/flink/cdc/connectors/postgres/source/PostgresConnectionPoolFactory.java
b/fs_brokers/cdc_client/src/main/java/org/apache/flink/cdc/connectors/postgres/source/PostgresConnectionPoolFactory.java
deleted file mode 100644
index 503473a68ba..00000000000
---
a/fs_brokers/cdc_client/src/main/java/org/apache/flink/cdc/connectors/postgres/source/PostgresConnectionPoolFactory.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.flink.cdc.connectors.postgres.source;
-
-import org.apache.flink.cdc.connectors.base.config.JdbcSourceConfig;
-import
org.apache.flink.cdc.connectors.base.relational.connection.ConnectionPoolId;
-import
org.apache.flink.cdc.connectors.base.relational.connection.JdbcConnectionPoolFactory;
-
-import com.zaxxer.hikari.HikariDataSource;
-import io.debezium.jdbc.JdbcConfiguration;
-
-/**
- * A connection pool factory to create pooled Postgres {@link
HikariDataSource}. Copy from
- *
https://github.com/apache/flink-cdc/blob/release-3.5/flink-cdc-connect/flink-cdc-source-connectors/flink-connector-postgres-cdc/src/main/java/org/apache/flink/cdc/connectors/postgres/source/PostgresConnectionPoolFactory.java
- * Line 54: to use config.getUser() instead of config.getHostname() as
username to fix FLINK-38847
- */
-public class PostgresConnectionPoolFactory extends JdbcConnectionPoolFactory {
- public static final String JDBC_URL_PATTERN = "jdbc:postgresql://%s:%s/%s";
-
- @Override
- public String getJdbcUrl(JdbcSourceConfig sourceConfig) {
-
- String hostName = sourceConfig.getHostname();
- int port = sourceConfig.getPort();
- String database = sourceConfig.getDatabaseList().get(0);
- return String.format(JDBC_URL_PATTERN, hostName, port, database);
- }
-
- /**
- * The reuses of connection pools are based on databases in postgresql.
Different databases in
- * same instance cannot reuse same connection pool to connect.
- */
- @Override
- public ConnectionPoolId getPoolId(
- JdbcConfiguration config, String dataSourcePoolFactoryIdentifier) {
- return new ConnectionPoolId(
- config.getHostname(),
- config.getPort(),
- config.getUser(),
- config.getDatabase(),
- dataSourcePoolFactoryIdentifier);
- }
-}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]