XComp opened a new pull request, #21740: URL: https://github.com/apache/flink/pull/21740
## What is the purpose of the change The entire purpose of this wrapper `DispatcherRunnerLeaderElectionLifecycleManager` is to have the start/stop of the `LeaderElectionService` out of the `DefaultDispatcherRunner`. FLINK-26522/FLIP-285 will move this logic into the `HighAvailabilityServices`. Merging both classes makes the move easier because it aligns it with the other `LeaderContender` implementations. I couldn't find any reason why we need this class. There was a [brief discussion in PR #9832](https://github.com/apache/flink/pull/9832#discussion_r334866031) for FLINK-11843 which introduced this change. But even there, we already discussed having a `start()` method, instead. ## Brief change log Moved code from `DispatcherRunnerLeaderElectionLifecycleManager` back into `DefaultDispatcherRunner`. ## Verifying this change * `DefaultDispatcherRunnerTest.testLeaderElectionStarted` was added to check the lifecycle explicitly. This test is good to check that the `LeaderElectionService` is closed as part of the `DefaultDispatcherRunner.close()` call. * Various tests within `DefaultDispatcherRunnerTest` would fail without the start method being called. ## 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 -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org