Fly-Style commented on code in PR #19622:
URL: https://github.com/apache/druid/pull/19622#discussion_r3473035725


##########
indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/autoscaler/CostBasedAutoScaler.java:
##########
@@ -103,6 +115,11 @@ public CostBasedAutoScaler(
     this.costFunction = new WeightedCostFunction();
     this.autoscalerExecutor = 
Execs.scheduledSingleThreaded("CostBasedAutoScaler-"
                                                             + 
StringUtils.encodeForFormat(spec.getId()));
+
+    // Bound the rate watermark to roughly one task's lifetime (in 
collectMetrics() ticks).
+    final long taskDurationMillis = 
supervisor.getIoConfig().getTaskDuration().getStandardSeconds() * 1000L;
+    this.lagGatedRateWindowSize = Math.max(1, (int) (taskDurationMillis / 
config.getScaleActionPeriodMillis()));

Review Comment:
   We're receiving new metrics once per `scaleActionPeriodMillis`, but yeah, we 
probably should increase this window size. 50 or 100 looks like a decent size.



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