You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Matthias Pohl (Jira)" <ji...@apache.org> on 2023/04/18 09:38:00 UTC
[jira] [Created] (FLINK-31837) Move LeaderElectionDriver instantiated into DefaultLeaderElectionService's constructor
Matthias Pohl created FLINK-31837:
-------------------------------------
Summary: Move LeaderElectionDriver instantiated into DefaultLeaderElectionService's constructor
Key: FLINK-31837
URL: https://issues.apache.org/jira/browse/FLINK-31837
Project: Flink
Issue Type: Sub-task
Components: Runtime / Coordination
Reporter: Matthias Pohl
With the {{MultipleComponentLeaderElection*}} classes we added a circular dependency between the {{DefaultLeaderElectionService}} and the {{DefaultMultipleComponentLeaderElectionService}} which calls the {{DefaultLeaderElectionService.onGrantLeadership}} while registering the service in [DefaultMultipleComponentLeaederElectionService:152|https://github.com/apache/flink/blob/master/flink-runtime/src/main/java/org/apache/flink/runtime/leaderelection/DefaultMultipleComponentLeaderElectionService.java#L152]. This call will result in accessing the {{DefaultLeaderElectionService}} instance which is still in instantiation phase.
We're losing the circular dependency with the {{MultipleComponentsLeaderElectionDriverAdapter}} class going away. Hence, we can go ahead and move the driver instantiation into the constructor.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)