[fix][broker] Fail fast if the extensible load manager failed to start - #23297
Merged
BewareMyPower merged 6 commits intoSep 13, 2024
Merged
Conversation
…nel (ExtensibleLoadManagerImpl only) (apache#23230)" This reverts commit 8bb30a1.
BewareMyPower
requested review from
Demogorgon314,
codelipenghui,
heesung-sohn,
lhotari and
mattisonchao
September 12, 2024 15:00
codelipenghui
approved these changes
Sep 12, 2024
4 tasks
heesung-sohn
approved these changes
Sep 12, 2024
RobertIndie
approved these changes
Sep 13, 2024
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.
|
lhotari
pushed a commit
to lhotari/pulsar
that referenced
this pull request
Sep 13, 2024
apache#23297) (cherry picked from commit fc60ec0)
Merged
4 tasks
Member
|
There are issues in backporting to branch-3.0. I created a separate PR #23297 |
nikhil-ctds
pushed a commit
to datastax/pulsar
that referenced
this pull request
Sep 19, 2024
…iled to start (apache#23297) (apache#23302) Co-authored-by: Yunze Xu <xyzinfernity@163.com> (cherry picked from commit 6d8b15d)
srinath-ctds
pushed a commit
to datastax/pulsar
that referenced
this pull request
Sep 19, 2024
…iled to start (apache#23297) (apache#23302) Co-authored-by: Yunze Xu <xyzinfernity@163.com> (cherry picked from commit 6d8b15d)
hanmz
pushed a commit
to hanmz/pulsar
that referenced
this pull request
Feb 12, 2025
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
#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#unregisterwill 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
failStartingcorrectly:BrokerRegistry#closeand swallow the exception.initWaiterwith false to tell background threads to exit directly. Otherwise, methods likeplayFollowerwill swallow the exception frominitWaiterand continue the loop.PulsarServerExceptioninto a unchecked exceptionCompletionExceptionand unwrap it inPulsarService#start's catch block.LoadManagerFailFastTestto verify the fail-fast behaviors and the broker will unregister itself from the metadata store.Documentation
docdoc-requireddoc-not-neededdoc-completeMatching PR in forked repository
PR in forked repository: