Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PIP-45: Revalidate leader election after session is recovered #10457

Merged
merged 4 commits into from May 4, 2021

Conversation

merlimat
Copy link
Contributor

Motivation

The leader election component should revalidate the leadership ephemeral node once the session is re-established.

Modifications

  1. When acquiring leadership, check if the node is a left over from an older session or if it belongs to a different instance
  2. Re-trigger leader election on session re-establishment. If that fails, notify the listener that the mode has changed into Follower.

@merlimat merlimat added the type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages label Apr 30, 2021
@merlimat merlimat added this to the 2.8.0 milestone Apr 30, 2021
@merlimat merlimat self-assigned this Apr 30, 2021
Copy link
Contributor

@eolivelli eolivelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome

+1

@merlimat merlimat merged commit 2698946 into apache:master May 4, 2021
@merlimat merlimat deleted the leader-election-resync branch May 4, 2021 05:23
eolivelli pushed a commit to eolivelli/pulsar that referenced this pull request May 11, 2021
…#10457)

* PIP-45: Revalidate leader election after session is recovered

* Fixed TopicOwnerTest

* Addresses comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants