-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[fix][broker] fix MetadataStoreException$NotFoundException while doing topic lookup #15633
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] fix MetadataStoreException$NotFoundException while doing topic lookup #15633
Conversation
…g topic lookup ### Motivation apache#14839 fixes the http lookup with multiple advertised listeners, and the added test is try to verify the advertised listeners with 2 brokers, but the config of the additional broker will not update, so the test get passed. The root cause is we are using the (advertised address + WebService port) to register the broker under the loadbalance path, but while creating the lookup result, we will use the WebService URL to get the data, so we will get `MetadataStoreException$NotFoundException`. ### Modification - Added properties support for ResourceUnit, so that we can carry more information while getting least loaded broker - For creating the lookup result, use the broker znode name to get the broker data if it presents in the ResourceUnit ### Verification No new tests needed, just fix the test that added in apache#14839
|
@codelipenghui:Thanks for your contribution. For this PR, do we need to update docs? |
1 similar comment
|
@codelipenghui:Thanks for your contribution. For this PR, do we need to update docs? |
|
@codelipenghui:Thanks for providing doc info! |
|
/pulsarbot run-failure-checks |
pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/SimpleResourceUnit.java
Outdated
Show resolved
Hide resolved
pulsar-broker/src/test/java/org/apache/pulsar/broker/loadbalance/AdvertisedListenersTest.java
Outdated
Show resolved
Hide resolved
pulsar-broker/src/main/java/org/apache/pulsar/broker/namespace/NamespaceService.java
Show resolved
Hide resolved
…g topic lookup (apache#15633) (cherry picked from commit 70551a6) (cherry picked from commit 6415b31)
Motivation
#14839 fixes the HTTP lookup with multiple advertised listeners, and the added test
is trying to verify the advertised listeners with 2 brokers, but the config of the
the additional broker will not update, so the test gets passed.
The root cause is we are using the (advertised address + WebService port) to register
the broker under the loadbalance path, but while creating the lookup result, we will
use the WebService URL to get the data, so we will get
MetadataStoreException$NotFoundException.Modification
Verification
No new tests are needed, just fix the test that was added in #14839
Documentation
Check the box below or label this PR directly.
Need to update docs?
no-need-doc(bug fix)