[fix][broker] Fix create cluster with empty url - #19762
Conversation
|
/pulsarbot rerun-failure-checks |
|
/pulsarbot rerun-failure-checks |
5766204 to
472687a
Compare
|
/pulsarbot rerun-failure-checks |
1 similar comment
|
/pulsarbot rerun-failure-checks |
472687a to
6a0fd33
Compare
|
/pulsarbot rerun-failure-checks |
d7d7782 to
c1e495d
Compare
Signed-off-by: Zixuan Liu <nodeces@gmail.com>
c1e495d to
3ec995c
Compare
| @Nonnull Predicate<URI> predicate, | ||
| @Nullable String errorMessage) throws IllegalArgumentException { | ||
| if (uri == null) { | ||
| if (uri == null || uri.length() == 0) { |
There was a problem hiding this comment.
I think one risk here is that it is now possible to create a cluster with all empty cluster urls. I think it might make sense to verify that there is some URL that is not zero length.
Additionally, one benefit of this change is for clusters that only want to supply a TLS url.
What is your opinion @nodece?
There was a problem hiding this comment.
I think one risk here is that it is now possible to create a cluster with all empty cluster urls. I think it might make sense to verify that there is some URL that is not zero length.
Sure, I agreed with you! We must ensure that at least one URL is a non-zero length when creating the cluster.
Do you make a PR to do that? Recently, I don't have time to maintain the Pulsar :(
There was a problem hiding this comment.
I'll create a GitHub issue and label it as a good one for first time contributors.
There was a problem hiding this comment.
I created #19866.
Also, while looking into it, I realized that this PR didn't introduce the possibility of configuring no urls. The issue I created is very low priority.
Motivation
When creating the cluster, if the
serviceUrlTlsis empty in theClusterData, I gotIllegal service tls url, example: https://pulsar.example.com:8443. I expect the Pulsar works fine.#19151 breaks this behavior, see the following code:
This check should also ignore the empty URL.
Modifications
Verifying this change
Added
testCreateClustertest.Documentation
docdoc-requireddoc-not-neededdoc-complete