Niklas Semmler created FLINK-26502: -------------------------------------- Summary: 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
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)