XComp commented on code in PR #22380:
URL: https://github.com/apache/flink/pull/22380#discussion_r1169874448
##########
flink-runtime/src/test/java/org/apache/flink/runtime/leaderelection/TestingLeaderElectionDriver.java:
##########
@@ -70,22 +77,37 @@ public LeaderInformation getLeaderInformation() {
}
public void isLeader() {
+ isLeader(FutureUtils.completedVoidFuture());
+ }
+
+ public void isLeader(CompletableFuture<Void> grantLeadershipFuture) {
synchronized (lock) {
isLeader.set(true);
- leaderElectionEventHandler.onGrantLeadership(UUID.randomUUID());
+ grantLeadershipFuture.thenRun(
+ () ->
leaderElectionEventHandler.onGrantLeadership(UUID.randomUUID()));
Review Comment:
That's related to your [other
comment](https://github.com/apache/flink/pull/22380#discussion_r1168771139).
I'm inclined to halt this PR and create a separate ticket that moves the thread
handling from `DefaultMultipleComponentLeaderElectionService` into the
`DefaultLeaderElectionService`
--
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]