XComp opened a new pull request, #21819: URL: https://github.com/apache/flink/pull/21819
LeaderElectionEventHandler.onLeaderInformationChange should only be called if the handler (i.e. DefaultLeaderElectionService) is actually the leader. This check is already implemented in the corresponding calling methods of the MultipleComponentLeaderElectionDriver implementations. But these methods only schedule the logic rather than executing it right away. The execution is handled in a separate thread (i.e. DefaultMultipleComponentLeaderElectionService#leadershipOperationExecutor). That might create a race condition if a leader change is queued up already but not performed, yet, before the leader information change event gets queued up as well. 1.16 backport PR of parent PR #21537 -- 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]
