[fix][broker] Fix leader broker cannot be determined when the advertised address and advertised listeners are configured#21894
Conversation
|
bug report on Pulsar Slack, https://apache-pulsar.slack.com/archives/C5Z4T36F7/p1705041494476059 ... UPDATE: reported as #21897 |
dragosvictor
left a comment
There was a problem hiding this comment.
Nice fix! These URLs were always confusing.
Left a couple of comments below.
Thanks for the review and suggestions. I made the suggested changes. |
|
There's also a test case that reproduces the issue. |
|
@lhotari can this be cherry-picked in 2.10.4 and 2.11 also please |
@Meet0861 The support for 2.10.x and 2.11.x has ended according to the Apache Pulsar Release Policy. There's a mailing list discussion about making an explicit decision about 2.10 and 2.11 . Please participate in the discussion. |
…sed address and advertised listeners are configured (apache#21894) (cherry picked from commit 3158fd3) (cherry picked from commit 358d122)
…sed address and advertised listeners are configured (apache#21894) (cherry picked from commit 3158fd3) (cherry picked from commit 358d122)
Fixes #21897
Motivation
There's currently a problem that the leader broker cannot be determined when the advertised address and advertised listeners are configured.
The workaround to the problem is to properly configure an internal advertised listener which matches the advertised address. However, applying the workaround is brittle.
The code base has had inconsistent ways for a unique identifier for a broker. In some cases, there's a dummy "http://" prefix for the identifier even when the port is the https port. This is very confusing.
This PR makes the broker identifier match the "lookup service address" in all cases. The "lookup service address" has been also renamed in this PR to "broker id" since that is the true meaning of the previously called "lookup service address".
Modifications
brokerIdfield to the leader broker information and keep the previousserviceUrlwithout changing it's meaning and content.Documentation
docdoc-requireddoc-not-neededdoc-completeMatching PR in forked repository
PR in forked repository: lhotari#170