[ 
https://issues.apache.org/jira/browse/FLINK-30765?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17679155#comment-17679155
 ] 

Matthias Pohl commented on FLINK-30765:
---------------------------------------

FLINK-30759 clears things up for the 
{{DispatcherRunnerLeaderElectionLifecycleManager}} and 
{{DefaultDispatcherRunner}} shutdown. 
Currently, the manager stops the {{LeaderElectionService}}. Closing the 
{{DefaultDispatcherRunner}} happens in parallel which causes a raise condition 
when {{revokeLeadership}} is called by {{LeaderElectionService.stop()}}. Both 
will trigger {{DefaultDispatcherRunner.stopDispatcherLeaderProcess()}} to be 
called. Merging both classes will make the shutdown process clearer.

> LeaderElectionService.stop should always call revokeLeadership
> --------------------------------------------------------------
>
>                 Key: FLINK-30765
>                 URL: https://issues.apache.org/jira/browse/FLINK-30765
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Runtime / Coordination
>    Affects Versions: 1.17.0
>            Reporter: Matthias Pohl
>            Assignee: Matthias Pohl
>            Priority: Major
>
> The current implementations of {{LeaderElectionService}} do not implement the 
> {{stop()}} call consistently. Some (e.g. 
> [StandaloneLeaderElectionService|https://github.com/apache/flink/blob/c6997c97c575d334679915c328792b8a3067cfb5/flink-runtime/src/main/java/org/apache/flink/runtime/leaderelection/StandaloneLeaderElectionService.java#L53]
>  call revoke on the {{LeaderContender)}} whereas others don't (e.g. 
> [DefaultLeaderElectionService|https://github.com/apache/flink/blob/6e1caa390882996bf2d602951b54e4bb2d9c90dc/flink-runtime/src/main/java/org/apache/flink/runtime/leaderelection/DefaultLeaderElectionService.java#L96]).
>  The 
> [MultipleComponentLeaderElectionService|https://github.com/apache/flink/blob/0290715a57b8d243586ab747b0cd2416c8081012/flink-runtime/src/main/java/org/apache/flink/runtime/leaderelection/DefaultMultipleComponentLeaderElectionService.java#L166]
>  does call revoke on the {{LeaderContender}} instances, though.
> We should align this behavior and specify it in the LeaderElectionService 
> contract before going ahead with refactoring the interfaces (FLIP-285).



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to