sandeep-mst commented on code in PR #25067:
URL: https://github.com/apache/pulsar/pull/25067#discussion_r2611682291


##########
pulsar-broker-common/src/main/java/org/apache/pulsar/bookie/rackawareness/BookieRackAffinityMapping.java:
##########
@@ -169,6 +170,13 @@ private void watchAvailableBookies() {
         }
     }
 
+    private synchronized Void processRackUpdate(BookiesRackConfiguration 
racks) {
+        updateRacksWithHost(racks);
+        // Notify ensemble placement policy after rack info is updated to 
ensure consistent state.
+        rackChangeListenerCallback(new ArrayList<>(bookieAddressListLastTime));
+        return null;
+    }

Review Comment:
   Yes, that makes sense as the the lock doesn't need to be held till 
`rackChangeListenerCallback(bookieIdSet);` completes.
   
   Thanks for the find.
   
   Updated.



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