Jackie-Jiang commented on a change in pull request #4119: Improve partition
aware routing when a server is down.
URL: https://github.com/apache/incubator-pinot/pull/4119#discussion_r276034823
##########
File path:
pinot-broker/src/main/java/org/apache/pinot/broker/routing/builder/BasePartitionAwareRoutingTableBuilder.java
##########
@@ -101,40 +101,59 @@ public void init(Configuration configuration,
TableConfig tableConfig, ZkHelixPr
Map<String, List<String>> routingTable = new HashMap<>();
SegmentPrunerContext prunerContext = new
SegmentPrunerContext(request.getBrokerRequest());
- // 1. Randomly pick a replica id
- int replicaId = _random.nextInt(_numReplicas);
+ // Shuffle the replica group id pool in order to satisfy:
+ // 1. Pick a replica group in an evenly distributed fashion
+ // 2. When a server is not available, the request should be distributed
evenly among other available servers.
+ int[] replicaGroupIdPool = new int[_numReplicas];
Review comment:
shuffledReplicaGroupIds?
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]