zymap commented on a change in pull request #8961:
URL: https://github.com/apache/pulsar/pull/8961#discussion_r544894740



##########
File path: 
pulsar-zookeeper-utils/src/main/java/org/apache/pulsar/zookeeper/ZkIsolatedBookieEnsemblePlacementPolicy.java
##########
@@ -147,6 +157,11 @@ private ZooKeeperCache getAndSetZkCache(Configuration 
conf) {
             Map<String, byte[]> customMetadata, List<BookieId> currentEnsemble,
             BookieId bookieToReplace, Set<BookieId> excludeBookies)
             throws BKNotEnoughBookiesException {
+        // parse the ensemble placement policy from the custom metadata, if it 
is present, we will apply it to
+        // the isolation groups for filtering the bookies.
+        Optional<EnsemblePlacementPolicyConfig> ensemblePlacementPolicyConfig =
+            getEnsemblePlacementPolicyConfig(customMetadata);
+        
ensemblePlacementPolicyConfig.ifPresent(this::fillIsolationGroupWithEnsemblePlacementPolicyConfig);

Review comment:
       I save the `group` information in the custom metadata.
   
   Currently, the `replaceBookie` will get all the bookies that are not in the 
primary group and secondary group and add them to the blacklist.
   Do you mean I should not fill the primary and secondary isolation groups 
with the ensemble placement policy config which read from the custom metadata 
rather that I should directly use the placement policy config to get a 
blacklist?




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to