Matthias Pohl created FLINK-31814:
-------------------------------------
Summary: Enable Precondition in DefaultLeaderElectionService.close
after the MultipleComponentLeaderElectionDriverAdapter is removed
Key: FLINK-31814
URL: https://issues.apache.org/jira/browse/FLINK-31814
Project: Flink
Issue Type: Sub-task
Reporter: Matthias Pohl
Currently, we have a cyclic dependency in the leader election code where the
{{DefaultLeaderElection.close()}} call will trigger the deregistration of the
{{LeaderElectionEventHandler}} (which is the very same
{{DefaultLeaderElectionService}} that is in the midst of being closed). The
deregistration is forwarded to the
{{DefaultMultipleComponentLeaderElectionService}} that will also trigger an
{{onRevokeLeadership()}} call on the {{{}LeaderElectionEventHandler{}}}.
There is an intended Precondition in {{DefaultLeaderElectionService.close}}
that works if the service has uni-directed ownership of the driver (i.e. the
driver doesn't call the service again). This Precondition is commented out
right now due to the cyclic dependency described above.
We can add the Precondition after
{{MultipleComponentLeaderElectionDriverAdapter}} is removed (and, therefore,
the cyclic dependency resolved).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)