You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2022/09/26 20:28:25 UTC

[GitHub] [pinot] Jackie-Jiang commented on a diff in pull request #9462: Adaptive Server Selection: address review comments

Jackie-Jiang commented on code in PR #9462:
URL: https://github.com/apache/pinot/pull/9462#discussion_r980471445


##########
pinot-broker/src/main/java/org/apache/pinot/broker/routing/instanceselector/BalancedInstanceSelector.java:
##########
@@ -62,14 +61,17 @@ Map<String, String> select(List<String> segments, int requestId,
         continue;
       }
 
-      String selectedServer = enabledInstances.get(requestId++ % enabledInstances.size());
-      if (adaptiveServerSelector != null) {
-        selectedServer = adaptiveServerSelector.select(enabledInstances);
+      String selectedServer;
+      if (_adaptiveServerSelector != null) {
+        selectedServer = _adaptiveServerSelector.select(enabledInstances);
+      } else {
+        selectedServer = enabledInstances.get(requestId++ % enabledInstances.size());
       }
 
       segmentToSelectedInstanceMap.put(segment, selectedServer);
     }
 
+

Review Comment:
   (nit) Remove empty line
   ```suggestion
   ```



-- 
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-unsubscribe@pinot.apache.org

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


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