This is an automated email from the ASF dual-hosted git repository. arvid pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/flink.git
commit 3342c231a2877f48540322f577527ec8bb765b08 Author: Arvid Heise <[email protected]> AuthorDate: Wed Apr 9 15:29:03 2025 +0200 [FLINK-37605][runtime] Clarify contract of endInput --- .../org/apache/flink/streaming/api/operators/BoundedOneInput.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/flink-runtime/src/main/java/org/apache/flink/streaming/api/operators/BoundedOneInput.java b/flink-runtime/src/main/java/org/apache/flink/streaming/api/operators/BoundedOneInput.java index 5a745238d69..cd027892193 100755 --- a/flink-runtime/src/main/java/org/apache/flink/streaming/api/operators/BoundedOneInput.java +++ b/flink-runtime/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)}.
