Shawyeok commented on code in PR #25825:
URL: https://github.com/apache/pulsar/pull/25825#discussion_r3286467305


##########
pulsar-broker-common/src/main/java/org/apache/pulsar/bookie/rackawareness/IsolatedBookieEnsemblePlacementPolicy.java:
##########
@@ -215,13 +218,7 @@ Set<BookieId> getExcludedBookiesWithIsolationGroups(int 
ensembleSize,
                     return excludedBookies;
                 }
                 int totalAvailableBookiesInPrimaryGroup = 0;
-                Set<String> primaryIsolationGroup = Collections.emptySet();
-                Set<String> secondaryIsolationGroup = Collections.emptySet();
                 Set<BookieId> primaryGroupBookies = new HashSet<>();
-                if (isolationGroups != null) {
-                    primaryIsolationGroup = isolationGroups.getLeft();
-                    secondaryIsolationGroup = isolationGroups.getRight();
-                }
                 for (String group : allGroups) {
                     Set<String> bookiesInGroup = 
allGroupsBookieMapping.get(group).keySet();
                     if (!primaryIsolationGroup.contains(group)) {

Review Comment:
   I've made a change of fallback to use defaultIsolationGroups when policy 
class doesn't match.



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