KKcorps commented on a change in pull request #6119:
URL: https://github.com/apache/incubator-pinot/pull/6119#discussion_r502295997



##########
File path: 
pinot-common/src/main/java/org/apache/pinot/common/utils/helix/HelixHelper.java
##########
@@ -422,10 +423,15 @@ public IdealState apply(@Nullable IdealState idealState) {
    * reuse instance configs in order to reduce ZK accesses
    */
   public static List<String> getInstancesWithTag(List<InstanceConfig> 
instanceConfigs, String tag) {
-    List<String> instancesWithTag = new ArrayList<>();
+    List<InstanceConfig> instancesWithTag = 
getInstancesConfigsWithTag(instanceConfigs, tag);
+    return 
instancesWithTag.stream().map(InstanceConfig::getInstanceName).collect(Collectors.toList());

Review comment:
       These APIs won't be called frequently. The only use of this API is to 
determine brokers for a tenant or table while creating a connection for a 
query. Once the connection is created, the API is only called again if the 
connection breaks.




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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to