[improve][broker]reduce lookup response meta exception while bundle is being unloaded
Fixed https://github.com/apache/pulsar/issues/12165
Motivation
see https://github.com/apache/pulsar/issues/12165 The bundle unloading of one producer or consumer will not affect other producers and consumers which belong to the same client and share the same connection.
If the bundle is being unloaded when there is a lookup request coming, the server will send back error code ServiceNotReady. And the client will close the connection in checkServerError.
https://github.com/apache/pulsar/blob/5c09d536304e5873c4e1ceeb8353a1150b5d61f4/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ClientCnx.java#L1123-L1130
The other producers and consumers will be affected due to they share the same connection. The requests of the connection will be drop.
Modifications
Add the error code ServiceNotReady with ServerMetadata. The client will not close the connection, and other producers and consumers will not be affected when the bundle is being unloaded.
Verifying this change
- [x] Make sure that the change passes the CI checks.
This change is a trivial rework / code cleanup without any test coverage.
Does this pull request potentially affect one of the following parts:
If yes was chosen, please highlight the changes
- Dependencies (does it add or upgrade a dependency): (no)
- The public API: (no)
- The schema: (no)
- The default values of configurations: (no)
- The wire protocol: (no)
- The rest endpoints: (no)
- The admin cli options: (no)
- Anything that affects deployment: (no)
Documentation
Check the box below and label this PR (if you have committer privilege).
Need to update docs?
- [x]
doc-not-needed
/pulsarbot run-failure-checks
/pulsarbot run-failure-checks
The pr had no activity for 30 days, mark with Stale label.