Hi all, Pulsar new version may lose bookie rack information. The problem does not occur in pulsar-2.9, but occurs after pulsar-2.10. I raise two issues to analyze the problem, https://github.com/apache/pulsar/issues/23282, https://github.com/apache/pulsar/issues/23330. There are two different cases resulting in rack information lost. The root reason of both is similar, listeners in registrationClient must be executed in a sync way.
And I raise two pr to fix the problem. https://github.com/apache/pulsar/pull/23283, this one revert a previous pr, make BookieRackAffinityMapping#watchAvailableBookies register a sync listener. It can fix the case when new bookies join and lose rack information. https://github.com/apache/pulsar/pull/23331, this one makes PulsarRegistrationClient#watchWritableBookies trigger each listener to ensure the sync way. It can fix the case when broker restart and may lose rack information. Thanks. Jianye Fan