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

Fixed NPE and cache invalidation in leader election #9460

Merged
merged 2 commits into from
Feb 4, 2021

Conversation

merlimat
Copy link
Contributor

@merlimat merlimat commented Feb 3, 2021

Motivation

Since we're relying on the watch to invalidate the cache, if another broker becomes leader we're trying in a loop to read and write based on an outdated version of metadata, until the watch arrives. Instead, since we already know that the cache is out of sync, we should proactively invalidate it.

@merlimat merlimat added the type/bug The PR fixed a bug or issue reported a bug label Feb 3, 2021
@merlimat merlimat added this to the 2.8.0 milestone Feb 3, 2021
@merlimat merlimat self-assigned this Feb 3, 2021
@lhotari
Copy link
Member

lhotari commented Feb 4, 2021

/pulsarbot run-failure-checks

@lhotari
Copy link
Member

lhotari commented Feb 4, 2021

/pulsarbot run-failure-checks

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.

LGTM

@merlimat merlimat merged commit cdef644 into apache:master Feb 4, 2021
@merlimat merlimat deleted the fix-leader-election-flaky branch February 4, 2021 23:18
merlimat added a commit to merlimat/pulsar that referenced this pull request Apr 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug The PR fixed a bug or issue reported a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants