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/06/30 11:29:00 UTC

[jira] [Updated] (FLINK-31837) Move LeaderElectionDriver instantiated into DefaultLeaderElectionService.register to instantiate the driver lazily

     [ https://issues.apache.org/jira/browse/FLINK-31837?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matthias Pohl updated FLINK-31837:
----------------------------------
    Summary: Move LeaderElectionDriver instantiated into DefaultLeaderElectionService.register to instantiate the driver lazily  (was: Move LeaderElectionDriver instantiated into DefaultLeaderElectionService's constructor)

> Move LeaderElectionDriver instantiated into DefaultLeaderElectionService.register to instantiate the driver lazily
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: FLINK-31837
>                 URL: https://issues.apache.org/jira/browse/FLINK-31837
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Runtime / Coordination
>            Reporter: Matthias Pohl
>            Priority: Major
>
> 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)