-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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][broker] Throw AlreadyClosedException while request to a closed metadata store #19055
Merged
codelipenghui
merged 5 commits into
apache:master
from
codelipenghui:penghui/metadata-store-close
Dec 26, 2022
Merged
[fix][broker] Throw AlreadyClosedException while request to a closed metadata store #19055
codelipenghui
merged 5 commits into
apache:master
from
codelipenghui:penghui/metadata-store-close
Dec 26, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
codelipenghui
added
the
type/enhancement
The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages
label
Dec 26, 2022
codelipenghui
added
area/broker
and removed
doc-not-needed
Your PR changes do not impact docs
labels
Dec 26, 2022
nodece
approved these changes
Dec 26, 2022
liangyepianzhou
approved these changes
Dec 26, 2022
/pulsarbot rerun-failure-checks |
Codecov Report
@@ Coverage Diff @@
## master #19055 +/- ##
============================================
+ Coverage 47.06% 47.14% +0.08%
- Complexity 10620 10622 +2
============================================
Files 709 710 +1
Lines 69423 69428 +5
Branches 7448 7450 +2
============================================
+ Hits 32677 32735 +58
+ Misses 33102 33026 -76
- Partials 3644 3667 +23
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Technoboy-
approved these changes
Dec 26, 2022
tisonkun
pushed a commit
to tisonkun/pulsar
that referenced
this pull request
Dec 27, 2022
This was referenced Jan 2, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area/broker
doc-not-needed
Your PR changes do not impact docs
ready-to-test
type/enhancement
The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
After the metadata store is closed, the metadata store will fail all the pending requests, but the new request will be blocked forever for the batched-supported metadata store.
The root cause is we are using a separate thread to flush the requests to the metadata services. The thread will be shutdown after the metadata store has been closed. But the new requests can still add to the pending requests and will never be complete.
So this PR is to prevent the new request to a closed metadata store. The caller will get
AlreadyClosedException
if the requested metadata store is closedIt will also fix some flaky tests that stuck at the broker shutdown. Here is an example
Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
Documentation
doc
doc-required
doc-not-needed
doc-complete
Matching PR in forked repository
PR in forked repository: codelipenghui#20