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); }