You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ar...@apache.org on 2025/04/29 13:00:08 UTC
(flink) 01/02: [FLINK-37605][runtime] Clarify contract of endInput
This is an automated email from the ASF dual-hosted git repository.
arvid pushed a commit to branch release-1.20
in repository https://gitbox.apache.org/repos/asf/flink.git
commit 0b6da412cc33b25f9f1ab812c0b1dc77e8329f99
Author: Arvid Heise <ar...@apache.org>
AuthorDate: Wed Apr 9 15:29:03 2025 +0200
[FLINK-37605][runtime] Clarify contract of endInput
(cherry picked from commit 3342c231a2877f48540322f577527ec8bb765b08)
---
.../org/apache/flink/streaming/api/operators/BoundedOneInput.java | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/BoundedOneInput.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/BoundedOneInput.java
index 5a745238d69..cd027892193 100755
--- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/BoundedOneInput.java
+++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/BoundedOneInput.java
@@ -35,6 +35,12 @@ public interface BoundedOneInput {
/**
* It is notified that no more data will arrive from the input.
*
+ * <p>Stateful operators need to be aware that a restart with rescaling may occur after
+ * receiving this notification. A changed source split assignment may imply that the same
+ * subtask of this operator that received endInput, has its state after endInput snapshotted,
+ * and will receive new data after restart. Hence, the state should not contain any finalization
+ * that would make it impossible to process new data.
+ *
* <p><b>WARNING:</b> It is not safe to use this method to commit any transactions or other side
* effects! You can use this method to flush any buffered data that can later on be committed
* e.g. in a {@link StreamOperator#notifyCheckpointComplete(long)}.