1996fanrui opened a new pull request, #29734: URL: https://github.com/apache/flink/pull/29734
## What is the purpose of the change Backport of https://github.com/apache/flink/pull/28572 to release-2.2. `CommonExecSinkITCase#testStreamRecordTimestampInserterSinkRuntimeProvider` can fail because the test's `TestSource` reader returns `END_OF_INPUT` right after emitting its rows, so the split-holding task may be FINISHED before `NoMoreSplitsEvent` is delivered. The undeliverable event is treated as a lost OperatorEvent and fails the job under `NoRestartBackoffTimeStrategy`. release-2.2 has the same reader code. ## Brief change log - Cherry-pick of 063b46ef668 (`[FLINK-40011][table-planner] Fix NoMoreSplitsEvent race in CommonExecSinkITCase`): the test reader defers `END_OF_INPUT` until `notifyNoMoreSplits()` has been received. - No difference from the original commit; the cherry-pick applied cleanly. ## Verifying this change This change is already covered by existing tests, such as `CommonExecSinkITCase`. It is a test-only change. Run on JDK 17: ```sh ./mvnw -pl flink-table/flink-table-planner -am -Pskip-webui-build -Dtest='CommonExecSinkITCase' -Dsurefire.failIfNoSpecifiedTests=false package ./mvnw -q -pl flink-table/flink-table-planner spotless:check checkstyle:check ``` Results: the test command passed 5 times out of 5 (`Tests run: 8, Failures: 0, Errors: 0, Skipped: 0` each time), and `spotless:check` and `checkstyle:check` passed. cc @MartijnVisser ## 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): no - 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 --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes (Claude Opus 5.5) Generated-by: Claude Opus 5.5 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
