From e4e31733a39a6e9037358595357d76aad759edc4 Mon Sep 17 00:00:00 2001 From: wudi <676366545@qq.com> Date: Tue, 2 Apr 2024 23:13:17 +0800 Subject: [PATCH] fix bug --- .../org/apache/doris/flink/sink/writer/DorisWriter.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/flink-doris-connector/src/main/java/org/apache/doris/flink/sink/writer/DorisWriter.java b/flink-doris-connector/src/main/java/org/apache/doris/flink/sink/writer/DorisWriter.java index 4ef1ab8f8..0717da101 100644 --- a/flink-doris-connector/src/main/java/org/apache/doris/flink/sink/writer/DorisWriter.java +++ b/flink-doris-connector/src/main/java/org/apache/doris/flink/sink/writer/DorisWriter.java @@ -292,6 +292,8 @@ public Collection prepareCommit() throws IOException, Interrup dorisStreamLoad.getHostPort(), dorisStreamLoad.getDb(), txnId)); + } else { + respFuture.complete(null); } } catch (Throwable e) { respFuture.completeExceptionally(e); @@ -302,7 +304,10 @@ public Collection prepareCommit() throws IOException, Interrup for (CompletableFuture committableFuture : committableFutures) { try { - committableList.add(committableFuture.get()); + DorisCommittable committable = committableFuture.get(); + if (committable != null) { + committableList.add(committable); + } } catch (ExecutionException e) { throw new RuntimeException(e); }