michaeljmarshall opened a new pull request #12900: URL: https://github.com/apache/pulsar/pull/12900
…connection is closed ### Motivation When producer creation times out on the client side, the producer sends a `CloseProducer` command and then a `Producer` command. Each time it tries to create a producer, it registers a callback on the same future because `getOrCreateTopic` loads from a cache. If the future completes after the timeout, multiple callbacks will run. We don't need to run the callbacks if the producer's future is complete or if the connection is no longer active. My only open question is whether or not we should add an info or a debug log in the conditional. Note that if the future was already completed, we would have logged its closure. We'd also log the closure of the connection. ### Modifications * Update `ServerCnx#handlProducer` to return early if the producer's future is complete or if the connection is no longer active. ### Verifying this change This change is covered by existing tests. ### Does this pull request potentially affect one of the following parts: This change is not breaking in any way. ### Documentation - [x] `no-need-doc` This is an internal optimization. -- 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]
