horizonzy opened a new issue, #18671:
URL: https://github.com/apache/pulsar/issues/18671

   ### Search before asking
   
   - [X] I searched in the [issues](https://github.com/apache/pulsar/issues) 
and found nothing similar.
   
   
   ### Version
   
   pulsar: master
   auto-recovery: inline in pulsar.
   
   ### Minimal reproduce step
   
   1. Use pulsar-admin to set rack info.
   2. Observe the AutoRecovery log, it show that aware the newest rack info.
   3. Restart AutoRecovery, it didn't aware the rack info, stepdown to default 
rack info `/default-region/default-rack`
   
   Analyze:
   The pulsar works well; the AutoRecovery works badly, the difference is 
RegistrationClient.
   In pulsar, it uses PulsarRegistrationClient to resolve the address; in 
AutoRecovery, it uses ZKRegistrationClient to resolve the address.
   
   The ZKRegistrationClient only resolves the address registered in zookeeper. 
PulsarRegistrationClient resolved the address directly, didn't care whether the 
address was registered in zookeeper or not.
   
   When parsing the rack info, it will resolve the address first, then use the 
resolved result to build rack info mapping. When AutoRecovery start, it will 
parse rack info first. At the same time, the ZKRegistrationClient didn't 
receive the registered
   address info, so ZKRegistrationClient can't parse rack info incorrectly.
   
   ### What did you expect to see?
   
   AutoRecovery also aware the rack info after restart.
   
   ### What did you see instead?
   
   AutoRecovery didn't aware the rack info after restart.
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [X] I'm willing to submit a PR!


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