kartikeypant opened a new pull request, #25034: URL: https://github.com/apache/flink/pull/25034
1.20 backport for parent PR https://github.com/apache/flink/pull/24917 --- ## What is the purpose of the change * This Pull Request addresses an important state memory leak issue identified within the default window operator of Apache Flink. * After this change, the cleanup timer should be registered for every window that's added to the window state regardless of it emitting a result after it’s fired. * This change is associated to the following bug: [FLINK-33192 ](https://issues.apache.org/jira/projects/FLINK/issues/FLINK-33192) ## Brief change log Modified `org.apache.flink.streaming.runtime.operators.windowing.WindowOperator` to register clean up timer for window states regardless of whether emits a result or not. ## Verifying this change - WindowOperatorTest is working for functional correctness. - Written a new test `testCleanupTimerWithEmptyStateNoResultForTumblingWindows`. This test simulates a empty returning aggregate function with tumbling windows. The passing of the test validates that the window contents are being cleared during the time the cleanup time is actually supposed to be called. Hence, the memory leak should not be happening after the change. ## Does this pull request potentially affect one of the following parts: - Dependencies (does it add or upgrade a dependency): no - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: no - The serializers: no - The runtime per-record code paths (performance sensitive): yes - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: no - The S3 file system connector: no ## Documentation - Does this pull request introduce a new feature? no - If yes, how is the feature documented? not applicable -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
