lhotari commented on PR #24371: URL: https://github.com/apache/pulsar/pull/24371#issuecomment-2948354217
@berg223 Regarding some other ExtensibleLoadManagerImpl related tests (in ExtensibleLoadManagerImplTest and in ServiceUnitStateChannelTest), one detail is about inconsistencies in how the test code changes the primary/leader by closing LeaderElectionImpl. LeaderElectionImpl should stop election operations after it's closed, but making that change will break tests. The draft change is https://github.com/apache/pulsar/pull/23995. I was planning to handle to problem by introducing an internal control interface for LeaderElection ``` public interface LeaderElectionControl { void releasePossibleLeaderRole(); void skipElections(); void resumeElections(); } ``` tests could use this instead of using hacks which they currently rely on. Releasing leadership could be useful also in production code later if there would be a need to let go of the leadership role on one broker. However, this would be initially targeted for tests and not exposed. the WIP changes are in https://github.com/apache/pulsar/compare/master...lhotari:pulsar:lh-fix-LeaderElectionImpl-close-wip -- 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]
