XComp commented on code in PR #22384:
URL: https://github.com/apache/flink/pull/22384#discussion_r1168749109
##########
flink-runtime/src/main/java/org/apache/flink/runtime/leaderelection/LeaderElectionService.java:
##########
@@ -53,24 +50,35 @@ public interface LeaderElectionService {
void stop() throws Exception;
/**
- * Confirms that the {@link LeaderContender} has accepted the leadership
identified by the given
- * leader session id. It also publishes the leader address under which the
leader is reachable.
- *
- * <p>The rational behind this method is to establish an order between
setting the new leader
- * session ID in the {@link LeaderContender} and publishing the new leader
session ID as well as
- * the leader address to the leader retrieval services.
- *
- * @param leaderSessionID The new leader session ID
- * @param leaderAddress The address of the new leader
+ * {@code LeaderElection} serves as a proxy between {@code
LeaderElectionService} and {@link
+ * LeaderContender}.
*/
- void confirmLeadership(UUID leaderSessionID, String leaderAddress);
+ interface LeaderElection {
Review Comment:
Working on the follow-up PRs (more specifically:
https://github.com/apache/flink/pull/22404) properly (especially refactoring
all the tests), I start to believe that having this as a sub-interface isn't
the best choice. `StandaloneLeaderElectionService` will be replaced by a
`StandaloneLeaderElection` implementation. The test cases which rely on a
`LeaderElection` do not necessarily rely on the `LeaderElectionService`,
either. Having them separate and not that closely-coupled feels like a more
reasonable thing to do. :thinking: WDYT?
--
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]