merlimat opened a new pull request, #22846:
URL: https://github.com/apache/pulsar/pull/22846
### Motivation
There are a couple of blocking calls to metadata in
`BookieRackAffinityMapping` class, in places where we're not supposed to make
any blocking calls.
This is made a bit hard by the BK rack-affinity interface that doesn't allow
to use futures.
### Modifications
During the initial `setConf()` load the list of bookie-racks info
asynchronously, and set up the async watch. This seems the most sensible
approach, barring a complete redesign of the rack-affinity interface in BK.
### 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]