-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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 the inconsistency of AdvertisedAddress #10312
Conversation
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 +1
@codelipenghui @jiazhai @eolivelli PTAL again. thanks. |
Now this bug will cause advertisedListeners to be set but invalid, because some places still get advertisedAddress |
ping @eolivelli Can you help review this change again. |
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.
Overall lgtm
I left a comment, we should state it clear that that method is only internal.
We could also annotate it with our annotations that describe private API
pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java
Outdated
Show resolved
Hide resolved
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
very good
### Motivation There is an `advertisedAddress` in PusarService and an `advertisedAddress` in conf. When `advertisedListener` is set, the values of the two `advertisedAddress` will be inconsistent. In the current code, `PusarService.getAdvertisedAddress` is used in some places, and `conf.getAdvertisedAddress` is used in other places. ### Modifications Put this logic into the config to keep the values in all places consistent.
There is an `advertisedAddress` in PusarService and an `advertisedAddress` in conf. When `advertisedListener` is set, the values of the two `advertisedAddress` will be inconsistent. In the current code, `PusarService.getAdvertisedAddress` is used in some places, and `conf.getAdvertisedAddress` is used in other places. Put this logic into the config to keep the values in all places consistent. (cherry picked from commit d39e5e4)
Motivation
There is an
advertisedAddress
in PusarService and anadvertisedAddress
in conf. WhenadvertisedListener
is set, the values of the twoadvertisedAddress
will be inconsistent.In the current code,
PusarService.getAdvertisedAddress
is used in some places, andconf.getAdvertisedAddress
is used in other places.Modifications
Put this logic into the config to keep the values in all places consistent.
Verifying this change