hangc0276 commented on a change in pull request #14248:
URL: https://github.com/apache/pulsar/pull/14248#discussion_r805702221



##########
File path: 
pulsar-broker-common/src/main/java/org/apache/pulsar/bookie/rackawareness/BookieRackAffinityMapping.java
##########
@@ -201,7 +216,16 @@ private void handleUpdates(Notification n) {
                                 bookieAddressList.add(BookieId.parse(addr));
                             }
                         }
-                        rackawarePolicy.onBookieRackChange(bookieAddressList);
+                        if (LOG.isDebugEnabled()) {
+                            LOG.debug("Bookies with rack update from {} to 
{}", bookieAddressListLastTime,
+                                    bookieAddressList);
+                        }
+                        if (bookieAddressListLastTime.size() > 
bookieAddressList.size()) {

Review comment:
       @aloyszhang Thanks for you contribution. 
   For the following case:
   old rack placement map:
   rack0 bookie0
   rack0 bookie2
   rack0 bookie3
   rack1 bookie4
   rack1 bookie5
   rack1 bookie6
   ===>
   new rack placement map:
   rack0 bookie0
   rack0 bookie2
   rack0 bookie3
   rack2 bookie10
   rack2 bookie11
   
   The new rack placement map won't take affect until next update. 
   Please add a test to cover this case.




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