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

Fix stuck lookup operations when the broker is starting up #8273

Merged
merged 1 commit into from
Oct 16, 2020

Conversation

merlimat
Copy link
Contributor

Motivation

When the broker is starting up, it might start getting lookup requests before all the components of the service are fully initialized. In this particular case a lookup will fail on NPE because the leader election service is not ready yet (it gets instantiated after the broker service).

This NPE causes a series of rippling effects:

  • The future for the request hitting NPE are not completed
  • They stay stale in the findingBundlesNotAuthoritative cache map forever
  • All other lookup requests are piggy-backing on the first futures (but these will not complete)
  • We reach the max number of pending lookup requests, after which the broker rejects new lookup

@merlimat merlimat added type/bug The PR fixed a bug or issue reported a bug release/2.6.2 labels Oct 15, 2020
@merlimat merlimat added this to the 2.7.0 milestone Oct 15, 2020
@merlimat merlimat self-assigned this Oct 15, 2020
@jiazhai jiazhai merged commit b57c163 into apache:master Oct 16, 2020
wolfstudy pushed a commit that referenced this pull request Oct 30, 2020
Motivation
When the broker is starting up, it might start getting lookup requests before all the components of the service are fully initialized. In this particular case a lookup will fail on NPE because the leader election service is not ready yet (it gets instantiated after the broker service).

This NPE causes a series of rippling effects:

The future for the request hitting NPE are not completed
They stay stale in the findingBundlesNotAuthoritative cache map forever
All other lookup requests are piggy-backing on the first futures (but these will not complete)
We reach the max number of pending lookup requests, after which the broker rejects new lookup

(cherry picked from commit b57c163)
huangdx0726 pushed a commit to huangdx0726/pulsar that referenced this pull request Nov 13, 2020
Motivation
When the broker is starting up, it might start getting lookup requests before all the components of the service are fully initialized. In this particular case a lookup will fail on NPE because the leader election service is not ready yet (it gets instantiated after the broker service).

This NPE causes a series of rippling effects:

The future for the request hitting NPE are not completed
They stay stale in the findingBundlesNotAuthoritative cache map forever
All other lookup requests are piggy-backing on the first futures (but these will not complete)
We reach the max number of pending lookup requests, after which the broker rejects new lookup
flowchartsman pushed a commit to flowchartsman/pulsar that referenced this pull request Nov 17, 2020
Motivation
When the broker is starting up, it might start getting lookup requests before all the components of the service are fully initialized. In this particular case a lookup will fail on NPE because the leader election service is not ready yet (it gets instantiated after the broker service).

This NPE causes a series of rippling effects:

The future for the request hitting NPE are not completed
They stay stale in the findingBundlesNotAuthoritative cache map forever
All other lookup requests are piggy-backing on the first futures (but these will not complete)
We reach the max number of pending lookup requests, after which the broker rejects new lookup
@merlimat merlimat deleted the fix-lookup-bug branch November 24, 2020 16:24
merlimat added a commit to merlimat/pulsar that referenced this pull request Dec 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release/2.6.2 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

5 participants