TakaHiR07 opened a new pull request, #23331:
URL: https://github.com/apache/pulsar/pull/23331

   Main Issue: https://github.com/apache/pulsar/issues/23330
   
   Relevant issue: https://github.com/apache/pulsar/issues/23282, 
https://github.com/apache/pulsar/pull/23283
   
   
   
   ### Motivation
   
   Fix another issue cause broker lost rack information. There is a previous 
issue also cause broker lost rack information.
   
   ### Modifications
   
   This is the first potential fix, when construct bookieClient and do 
watchWritableBookies() to register listener, trigger each listener in 
writableBookiesWatchers. 
   
   This fix can ensure multiple listeners is trigger in a sync way, but it 
would bring duplicate trigger problem. Since watchWritableBookies() is only 
executed twice when bookieClient construct. I think the duplicate trigger 
problem is acceptable. 
   
   Alternative fix is to make BookieRackAffinityMapping#watchAvailableBookies 
become sync method. Change to 
registrationClient.watchWritableBookies(......).get() in 
BookieRackAffinityMapping#watchAvailableBookies. Now it is async. 
   
   ### Verifying this change
   
   - [ ] Make sure that the change passes the CI checks.
   
   
   
   ### 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 -->
   
   ### Matching PR in forked repository
   
   PR in forked repository: <!-- ENTER URL HERE -->
   
   
   


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