poorbarcode opened a new pull request, #21211:
URL: https://github.com/apache/pulsar/pull/21211

   ### Motivation
   
   **Background**: The Pulsar client will close the socket if it receives a 
ServiceNotReady error when doing a lookup. 
   see 
https://github.com/apache/pulsar/blob/af20a8a8623055bab665e566b3f54f6f884d121d/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ClientCnx.java#L1193-L1200
   
   Closing the socket causes the other consumer or producer to reconnect and 
does not make the lookup more efficient.
   
   There are two cases that should be improved:
   - If the topic is unloading, the broker responds with a `ServiceNotReady` 
error.
   - If the broker gets a metadata read/write error, the broker responds with a 
`ServiceNotReady` error.
   
   ### Modifications
   - Respond to the client with a `MetadataError` if the broker gets a metadata 
read/write error.
   - Respond to the client with a `MetadataError` if the topic is unloading
   
   ### 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 -->
   
   ### Matching PR in forked repository
   
   PR in forked repository: x


-- 
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]

Reply via email to