lhotari opened a new pull request #13066: URL: https://github.com/apache/pulsar/pull/13066
### Motivation `LeaderElectionService.getCurrentLeader()` always returned `Optional.empty()` on all other than the leader broker. This has several severe consequences in the Pulsar Broker code base. When a lookup is made to a topic that isn't currently loaded, the decision will be made in a distributed fashion on the follower brokers since the information about the leader broker is missing (because `LeaderElectionService.getCurrentLeader()` always returned `Optional.empty()`). This leads to races when assigning the topic ownership to a broker since the decision isn't made centrally on the leader broker. I'll provide a separate PR for improving and fixing the topic ownership assignment. ### Modifications - Add support for empheralOwner in MockZooKeeper - Add MultiBrokerBaseTest base test class for writing tests that involve multiple brokers - Add test case that fails without the fix - Make the fix to LeaderElectionImpl -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
