siddharthteotia commented on code in PR #9803:
URL: https://github.com/apache/pinot/pull/9803#discussion_r1023137053


##########
pinot-broker/src/main/java/org/apache/pinot/broker/routing/instanceselector/ReplicaGroupInstanceSelector.java:
##########
@@ -156,4 +159,20 @@ private void 
selectServersUsingAdaptiverServerSelector(List<String> segments, in
       segmentToSelectedInstanceMap.put(segment, selectedInstance);
     }
   }
+
+  private List<String> fetchCandidateServersForQuery(List<String> segments,
+      Map<String, List<String>> segmentToEnabledInstancesMap) {
+    List<String> serversList = new ArrayList<>();
+
+    Set<String> tempServerSet = new HashSet<>();
+    for (String segment : segments) {
+      List<String> enabledInstances = 
segmentToEnabledInstancesMap.get(segment);
+      if (enabledInstances != null) {
+        tempServerSet.addAll(enabledInstances);
+      }
+    }
+
+    serversList.addAll(tempServerSet);
+    return serversList;
+  }

Review Comment:
   hmm I am confused why should this code need to be implemented. 
   
   The logic used by replica group instance selector to pick candidate 
instances first is not getting changes by adaptive selection as the latter runs 
on top of it so shouldn't this logic already exist in the replica group 
instance selector ?



-- 
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: commits-unsubscr...@pinot.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to