michaeljmarshall opened a new pull request, #20062: URL: https://github.com/apache/pulsar/pull/20062
### Motivation The Pulsar Proxy has two modes for proxying requests. The first is to proxy lookup requests and the second is to proxy bytes. In the lookup case, the proxy handles redirects transparently to the client and only responds with the final result. In the proxying bytes case, the proxy connects to one upstream broker and forwards bytes between the client and the server. The only mode where a proxy needs a connection pool is the lookup proxy mode (the `ProxyLookupRequests` state). As such, I propose we only create a `ConnectionPool` when that is the state. ### Modifications * Relocate the initialization of `ConnectionPool` so that we only create it when the state is `ProxyLookupRequests`. * Added an assertion that the `completeConnect()` method is only called when the state is `Connecting`. * Change some logic in the authentication flow to ensure that authentication is correctly handled. ### Verifying this change The existing tests will cover this change sufficiently. ### Documentation - [x] `doc-not-needed` ### Matching PR in forked repository PR in forked repository: https://github.com/michaeljmarshall/pulsar/pull/42 -- 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: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org