You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Niklas Semmler (Jira)" <ji...@apache.org> on 2022/03/07 14:01:00 UTC

[jira] [Commented] (FLINK-26502) Multiple component leader election has different close/stop behavior

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

Niklas Semmler commented on FLINK-26502:
----------------------------------------

We found a better solution. Instead, we will ensure that the TestingMiniCluster stops HaServices of additional JobManagers.

> Multiple component leader election has different close/stop behavior 
> ---------------------------------------------------------------------
>
>                 Key: FLINK-26502
>                 URL: https://issues.apache.org/jira/browse/FLINK-26502
>             Project: Flink
>          Issue Type: Bug
>          Components: Runtime / Coordination
>    Affects Versions: 1.15.0
>            Reporter: Niklas Semmler
>            Priority: Blocker
>              Labels: pull-request-available
>
> The new multi component leader election driver behaves different when the service is closed.
> The [ZooKeeperLeaderElectionDriver#close|https://github.com/apache/flink/blob/master/flink-runtime/src/main/java/org/apache/flink/runtime/leaderelection/ZooKeeperLeaderElectionDriver.java#L120] method closes the Zookeeper connection. In contrast, the [MultipleComponentLeaderElectionDriverAdapter#close|https://github.com/apache/flink/blob/master/flink-runtime/src/main/java/org/apache/flink/runtime/leaderelection/MultipleComponentLeaderElectionDriverAdapter.java#L55] (also a LeaderElectionDriver object) only unregisters the event handler. It relies on the [ZooKeeperMultipleComponentLeaderElectionDriver#close|https://github.com/apache/flink/blob/master/flink-runtime/src/main/java/org/apache/flink/runtime/leaderelection/ZooKeeperMultipleComponentLeaderElectionDriver.java#L106] method to close the Zookeeper connection. Currently this method is only called when the HighAvailabilityServices are stopped. This difference in behavior means that previously enabled tests are not working anymore FLINK-25235.
> Together with [~dmvk], I propose that we align the behavior of the MultipleComponentLeaderElectionDriverAdapter to the existing behavior. We can do so by closing the Zookeeper connection once all components that are part of the multiple component leader election have stopped.
> PS: I use ZooKeeper here as an example, the same can be said about Kubernetes as well.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)