luwei16 commented on code in PR #19167:
URL: https://github.com/apache/doris/pull/19167#discussion_r1181231182
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/InternalCatalog.java:
##########
@@ -2538,6 +2541,13 @@ private void createTablets(String clusterName,
MaterializedIndex index, ReplicaS
if (chooseBackendsArbitrary) {
backendsPerBucketSeq = Maps.newHashMap();
}
+
+ Map<Tag, Integer> nextIndexs = new HashMap<>();
+ for (Map.Entry<Tag, Short> entry :
replicaAlloc.getAllocMap().entrySet()) {
+ // TODO: random roundrobin starting position
+ nextIndexs.put(entry.getKey(), 0);
Review Comment:
> I think of an implementation, for reference:
>
> 1. Select all candidate BE list according to the conditions (`tag`,
`storage_medium`, etc.).
> 2. In the list, select the BE with the least number of tablets as the
starting node to start executing RoundRobin.
>
> This method should be logically clearer, which is to separate the step of
"filtering BE by condition" from the "execution of RR".
done
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]