horizonzy commented on code in PR #4122:
URL: https://github.com/apache/bookkeeper/pull/4122#discussion_r1429741889


##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/RegionAwareEnsemblePlacementPolicy.java:
##########
@@ -134,7 +134,8 @@ public void handleBookiesThatJoined(Set<BookieId> 
joinedBookies) {
             topology.add(node);
             knownBookies.put(addr, node);
             historyBookies.put(addr, node);
-            String region = getLocalRegion(node);
+            String region = parseBookieRegion(addr);

Review Comment:
   > I think current code has updated address2Region in onBookieRackChange(). 
If oldRegion == newRegion, no need to update. If oldRegion != newRegion, would 
put in newRegion.
   > 
   > 
https://github.com/apache/bookkeeper/blob/9aad0453f0f17f45ea673e82fb63762156315e8b/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/RegionAwareEnsemblePlacementPolicy.java#L188-L194
   
   If the line_178 node is null, it does nothing.
   



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