nicoloboschi opened a new pull request, #19597: URL: https://github.com/apache/pulsar/pull/19597
### Motivation Regression of https://github.com/apache/pulsar/pull/19327 in the client, to understand if is connected through a proxy, it checks the logical address vs the physical one, if they're different it supposes it has to target that specific broker passing through the proxy. In the above pull request, the comparison logic is changed and the logical address is compared to ONE of the resolved dns names. in case of multiple dns names of the proxy, it might happens that the first resolved dns name doesn't match with the logical proxy address and therefore it's considered to be a broker dns name. This leads to the proxy to recursive send connections to itself. These are some logs extracted: ``` 11:02:35.141 [pulsar-client-io-2-1] INFO org.apache.pulsar.client.impl.PulsarChannelInitializer - initializeClientCnx DEBUG pulsar-proxy:6651, pulsar-proxy.pcert.svc.cluster.local:6651 11:02:35.147 [pulsar-client-io-2-1] INFO org.apache.pulsar.client.impl.ConnectionPool - [[id: 0xce7e9e49, L:/10.42.0.247:41194 - R:pulsar-proxy.pcert.svc.cluster.local/10.43.217.3:6651]] Connected to server 11:02:35.172 [pulsar-client-io-2-1] INFO org.apache.pulsar.client.impl.ClientCnx - [id: 0xce7e9e49, L:/10.42.0.247:41194 - R:pulsar-proxy.pcert.svc.cluster.local/10.43.217.3:6651] Connected through proxy to target broker at pulsar-proxy:6651 ``` ### Modifications * Revert the comparison logic changes while keeping the improvements of https://github.com/apache/pulsar/pull/19327 ### Verifying this change - [x] Make sure that the change passes the CI checks. ### Documentation <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. --> - [ ] `doc` <!-- Your PR contains doc changes. --> - [ ] `doc-required` <!-- Your PR changes impact docs and you will update later --> - [x] `doc-not-needed` <!-- Your PR changes do not impact docs --> - [ ] `doc-complete` <!-- Docs have been already added --> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
