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/28 12:14:00 UTC

[jira] [Assigned] (FLINK-31814) Enable Precondition in DefaultLeaderElectionService.close after the MultipleComponentLeaderElectionDriverAdapter is removed

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

Matthias Pohl reassigned FLINK-31814:
-------------------------------------

    Assignee: Matthias Pohl

> 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
>            Assignee: Matthias Pohl
>            Priority: Major
>              Labels: pull-request-available
>
> Currently, we have a cyclic dependency in the leader election code where the {{DefaultLeaderElection.close()}} (pre FLIP-285 code: {{{}DefaultLeaderElectionService.stop(){}}}) 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.onRevokeLeadership()}} introduced in FLINK-31773 that should be valid 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 and marked with this Jira issue FLINK-31814 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)