Matthias Pohl created FLINK-32422: ------------------------------------- Summary: EmbeddedLeaderService doesn't handle the leader events properly in edge cases Key: FLINK-32422 URL: https://issues.apache.org/jira/browse/FLINK-32422 Project: Flink Issue Type: Bug Components: Runtime / Coordination Affects Versions: 1.18.0 Reporter: Matthias Pohl
The leadership is granted when registering the first contender. This sets the leadership flag within the EmbeddedLeaderService (see [EmbeddedLeaderService:312ff|https://github.com/apache/flink/blob/033aca7566a0a561410b3c0e1ae8dca856cd26ce/flink-runtime/src/main/java/org/apache/flink/runtime/highavailability/nonha/embedded/EmbeddedLeaderService.java#L312]: the grantLeadershipCall is triggered afterwards informing the contender about its leadership). In the meantime, close can be called on the contender which deregisters the contender again calling revoke on the contender without having been able to gain the leadership. This issue was introduced by FLINK-30765. -- This message was sent by Atlassian Jira (v8.20.10#820010)