k2la opened a new pull request #8844: URL: https://github.com/apache/pulsar/pull/8844
### Motivation When the value of "/bookies" in ZooKeeper is changed, Brokers are notified of the change. After the notification to Brokers, only one of the two BookKeeper clients that Brokers have seems to reflect the change. **Two BookKeeper clients that Brokers have** - https://github.com/apache/pulsar/blob/ac0c6e41f0ebe3c900bb31e41c8d40b3f60b19df/pulsar-broker/src/main/java/org/apache/pulsar/broker/ManagedLedgerClientFactory.java#L81 - https://github.com/apache/pulsar/blob/102fa9de03509b86e47f58ab8e1c0dde2095da3b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/BookkeeperSchemaStorage.java#L105 The client of `BookkeeperSchemaStorage` don't seems to reflect the change. The cause is that `ZkBookieRackAffinityMapping#onUpdate` don't run. I confirmed that I change ZkBookieRackAffinityMapping instances to use same `ZooKeeperDataCache` and `ZkBookieRackAffinityMapping#onUpdate` works. ### Modification - Set the argument of `ZkBookieRackAffinityMapping#setConf` to `bookieMappingCache` - Move `updateRacksWithHost()` ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected]
