becketqin opened a new pull request #15425: URL: https://github.com/apache/flink/pull/15425
…in FLIP-27 source by stopping the mailbox loop in SourceOperatorStreamTask#finishTask(). ## What is the purpose of the change This patch fixes the stop-with-savepoint case with FLIP-27 source. The issue was that stop-with-savepoint logic expects the tasks to exit by themselves after the synchronous savepoint is taken. The FLIP-27 source did not implement `StreamTask#finishTask()` so the tasks won't exit. This patch fixes the issue by stopping the mailbox loop in the `SourceOperatorStreamTask#finishTask()` method. The unit test was copied from @kezhuw 's [branch](https://github.com/kezhuw/flink/commit/648473df15e7c7687debf93f531977f77e69cf1a). ## Brief change log - stop the mailbox loop in `SourceOperatorStreamTask#finishTask()` method. ## Verifying this change The following unit test has been added to verify the change. `SavepointITCase#testStopSavepointWithFlip27Source`. ## 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/Mesos, 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org