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

   ### Motivation
   
   Now the localNode is not updated after initialize. There exist some problems.
   
   1. LocalNode has wrong rack information. Because the execute order in the 
bookieClient constructor is :  initializeEnsemblePlacementPolicy()  ->  watch 
bookie join  -> rack information is load. So it would generate wrong localNode 
rack information in initializeEnsemblePlacementPolicy(), locality is not 
correct.
   2. If rack information is updated, localNode's information would not be 
updated. Locality is not correct.
   
   
   ### Changes
   
   1. In RackAwarePolicy, update localNode when handleBookiesThatJoined() and 
onBookieRackChange()
   2. In RegionAwarePolicy, update localNode and myRegion in based class. And 
update localNode in each region.
   3. do not use getLocalRegion(localNode). Because this method can not update 
myRegion
   4. Add test for both RackAware and RegionAware
   


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