AmatyaAvadhanula commented on code in PR #14584:
URL: https://github.com/apache/druid/pull/14584#discussion_r1295560086


##########
server/src/main/java/org/apache/druid/server/coordinator/loading/SegmentLoadingConfig.java:
##########
@@ -136,8 +121,35 @@ public int getMaxReplicaAssignmentsInRun()
     return maxReplicaAssignmentsInRun;
   }
 
-  public int getPercentDecommSegmentsToMove()
+  public int getBalancerComputeThreads()
   {
-    return percentDecommSegmentsToMove;
+    return balancerComputeThreads;
+  }
+
+  /**
+   * Computes the number of threads to be used in the balancing executor.
+   * The number of used segments in a cluster is generally a good indicator of
+   * the cluster size and has been used here as a proxy for the actual number 
of
+   * segments that would be involved in cost computations.
+   * <p>
+   * The number of threads increases by 1 first for every 50k segments, then 
for
+   * every 75k segments and so on.
+   *
+   * @return Number of {@code balancerComputeThreads} in the range [1, 8].
+   */
+  public static int computeNumBalancerThreads(int numUsedSegments)

Review Comment:
   My understanding was that cost computation complexity is a function of the 
number of loaded replicas when smart segment loading is used, and not of the 
total number of segments.
    
   Thanks for the clarification that the intent was because it's a good proxy 
in general



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

Reply via email to