-
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] Fail fast if the extensible load manager failed to start #23297
[fix][broker] Fail fast if the extensible load manager failed to start #23297
Conversation
…nel (ExtensibleLoadManagerImpl only) (apache#23230)" This reverts commit 8bb30a1.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
...src/main/java/org/apache/pulsar/broker/loadbalance/extensions/ExtensibleLoadManagerImpl.java
Show resolved
Hide resolved
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #23297 +/- ##
============================================
+ Coverage 73.57% 74.54% +0.97%
- Complexity 32624 33788 +1164
============================================
Files 1877 1927 +50
Lines 139502 145030 +5528
Branches 15299 15858 +559
============================================
+ Hits 102638 108115 +5477
+ Misses 28908 28648 -260
- Partials 7956 8267 +311
Flags with carried forward coverage won't be shown. Click here to find out more.
|
apache#23297) (cherry picked from commit fc60ec0)
There are issues in backporting to branch-3.0. I created a separate PR #23297 |
…iled to start (apache#23297) (apache#23302) Co-authored-by: Yunze Xu <xyzinfernity@163.com> (cherry picked from commit 6d8b15d)
…iled to start (apache#23297) (apache#23302) Co-authored-by: Yunze Xu <xyzinfernity@163.com> (cherry picked from commit 6d8b15d)
Motivation
#23230 tries to fix the issue that "the pulsar broker cannot catch the exception" caused by #22977. However, the fix is incorrect because even before #22977, the broker also wouldn't fail if the extensible load manager failed to start.
It's destructive to have broker running with a failed load manager. Since
BrokerRegistry#unregister
will be called for failures, the issue broker will unregister itself from the metadata store and it could not be selected as the owner broker. Besides, all lookup requests sent to this broker will fail because the load manager is not started.Modifications
failStarting
correctly:BrokerRegistry#close
and swallow the exception.initWaiter
with false to tell background threads to exit directly. Otherwise, methods likeplayFollower
will swallow the exception frominitWaiter
and continue the loop.PulsarServerException
into a unchecked exceptionCompletionException
and unwrap it inPulsarService#start
's catch block.LoadManagerFailFastTest
to verify the fail-fast behaviors and the broker will unregister itself from the metadata store.Documentation
doc
doc-required
doc-not-needed
doc-complete
Matching PR in forked repository
PR in forked repository: