You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ja...@apache.org on 2019/12/30 11:55:23 UTC

[flink] branch release-1.10 updated: [FLINK-15389][jdbc] Improve JDBCUpsertOutputFormat to schedule flusher when flushMaxSize is not one

This is an automated email from the ASF dual-hosted git repository.

jark pushed a commit to branch release-1.10
in repository https://gitbox.apache.org/repos/asf/flink.git


The following commit(s) were added to refs/heads/release-1.10 by this push:
     new 29be78d  [FLINK-15389][jdbc] Improve JDBCUpsertOutputFormat to schedule flusher when flushMaxSize is not one
29be78d is described below

commit 29be78d06e3ef2334252f7a2a9e6b036f4f540af
Author: zoudaokoulife <zo...@gmail.com>
AuthorDate: Sat Dec 28 15:13:05 2019 +0800

    [FLINK-15389][jdbc] Improve JDBCUpsertOutputFormat to schedule flusher when flushMaxSize is not one
    
    This closes #10712
---
 .../java/org/apache/flink/api/java/io/jdbc/JDBCUpsertOutputFormat.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/flink-connectors/flink-jdbc/src/main/java/org/apache/flink/api/java/io/jdbc/JDBCUpsertOutputFormat.java b/flink-connectors/flink-jdbc/src/main/java/org/apache/flink/api/java/io/jdbc/JDBCUpsertOutputFormat.java
index b3b4e03..cd1ced3 100644
--- a/flink-connectors/flink-jdbc/src/main/java/org/apache/flink/api/java/io/jdbc/JDBCUpsertOutputFormat.java
+++ b/flink-connectors/flink-jdbc/src/main/java/org/apache/flink/api/java/io/jdbc/JDBCUpsertOutputFormat.java
@@ -112,7 +112,7 @@ public class JDBCUpsertOutputFormat extends AbstractJDBCOutputFormat<Tuple2<Bool
 			throw new IllegalArgumentException("JDBC driver class not found.", cnfe);
 		}
 
-		if (flushIntervalMills != 0) {
+		if (flushIntervalMills != 0 && flushMaxSize != 1) {
 			this.scheduler = Executors.newScheduledThreadPool(
 					1, new ExecutorThreadFactory("jdbc-upsert-output-format"));
 			this.scheduledFuture = this.scheduler.scheduleWithFixedDelay(() -> {