Fly-Style commented on code in PR #19622:
URL: https://github.com/apache/druid/pull/19622#discussion_r3473090654
##########
indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/autoscaler/WeightedCostFunction.java:
##########
@@ -156,6 +157,19 @@ public CostResult computeCost(
return new CostResult(cost, lagCost, weightedIdleCost);
}
+ /**
+ * Derives the current idle ratio from measured utilization ({@code
avgProcessingRate / maxObservedRate}).
+ */
+ static double estimateIdleFromUtilization(CostMetrics metrics)
+ {
+ final Double maxObservedRate = metrics.getMaxObservedRate();
+ if (maxObservedRate == null || maxObservedRate <= 0) {
+ return IDEAL_IDLE_RATIO;
Review Comment:
This is a slippery place, but after short consideration I'd agree with you.
Reworking that part.
--
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]