xinghuayu007 commented on a change in pull request #5104:
URL: https://github.com/apache/incubator-doris/pull/5104#discussion_r549629355



##########
File path: fe/fe-core/src/main/java/org/apache/doris/qe/Coordinator.java
##########
@@ -1276,10 +1276,22 @@ private void computeScanRangeAssignmentByColocate(
     }
 
     // randomly choose a backend from the TScanRangeLocations for a certain 
bucket sequence.
-    private void getExecHostPortForFragmentIDAndBucketSeq(TScanRangeLocations 
seqLocation, PlanFragmentId fragmentId, Integer bucketSeq) throws Exception {
-        int randomLocation = new 
Random().nextInt(seqLocation.locations.size());
+    private void getExecHostPortForFragmentIDAndBucketSeq(TScanRangeLocations 
seqLocation, PlanFragmentId fragmentId, Integer bucketSeq,
+                                                          
HashMap<TNetworkAddress, Long> assignedBytesPerHost) throws Exception {
+        Long minAssignedBytes = Long.MAX_VALUE;

Review comment:
       Thanks for your code review. The code has been improved.




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