-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[improve][broker] Make get list from bundle Admin API async #20652
Merged
Technoboy-
merged 5 commits into
apache:master
from
Demogorgon314:Demogorgon314/make-getListFromBundle-async
Jun 30, 2023
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
c55fae6
Make getListFromBundle admin API async
Demogorgon314 ae48f34
fix list topic
Demogorgon314 cfd8387
Remove try/catch block
Demogorgon314 c30b42c
Do not remove destinationBroker when use ExtensibleLoadManagerImpl
Demogorgon314 45aa66a
Remove unused import
Demogorgon314 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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.
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.
Do we need to add this condition? And I'm not sure why need to reset the query param "destinationBroker".
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.
Yes, for the extensible load manager, the transfer operation needs to use
destinationBroker
as the destination broker.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.
Got it, thanks. Before, the param
destinationBroker
was only used by the bundle unload command, so it's a little confusing.The bundle unload command with the param
destinationBroker
can't work with the extensible load manager, right?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.
Before, the
destinationBroker
is set in the leader broker'sModularLoadManagerImpl#bundleBrokerAffinityMap
, so it requires redirecting to the leader and setting thedestinationBroker
before doing in the real unload operation.The unload operation requires execution in the owner broker, which will redirect to the owner broker after setting the
destinationBroker
success. If we don't clean thedestinationBroker
parameter, it will fall into a loop.The
ExtensibleLoadManagerImpl
used a different way to transfer the ownership todestinationBroker
, so we do not need to clean thedestinationBroker
parameter when redirecting. Since thedestinationBroker
do not set in the leader broker.For the detail, you can check this method: https://github.com/apache/pulsar/blob/master/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/NamespacesBase.java#L954
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.
nit: ppl will appreciate it if you can add these details as a comment.
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.
Got it, thanks.