diff --git a/flink-connector-influxdb2/src/main/java/org/apache/flink/streaming/connectors/influxdb/sink2/writer/InfluxDBWriter.java b/flink-connector-influxdb2/src/main/java/org/apache/flink/streaming/connectors/influxdb/sink2/writer/InfluxDBWriter.java index 10797ecf..299de4b0 100644 --- a/flink-connector-influxdb2/src/main/java/org/apache/flink/streaming/connectors/influxdb/sink2/writer/InfluxDBWriter.java +++ b/flink-connector-influxdb2/src/main/java/org/apache/flink/streaming/connectors/influxdb/sink2/writer/InfluxDBWriter.java @@ -89,6 +89,7 @@ public void write(IN in, Context context) throws IOException, InterruptedExcepti public void flush(boolean flush) throws IOException, InterruptedException { if (this.lastTimestamp == 0) return; + this.writeCurrentElements(); commit(Collections.singletonList(this.lastTimestamp)); }