jtuglu1 commented on code in PR #19269:
URL: https://github.com/apache/druid/pull/19269#discussion_r3065745195
##########
indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/autoscaler/LagBasedAutoScaler.java:
##########
@@ -239,19 +239,30 @@ private int computeDesiredTaskCount(List<Long> lags)
withinProportion, spec.getId()
);
- int currentActiveTaskCount = supervisor.getActiveTaskGroupsCount();
+ int currentActiveTaskCount = supervisor.getIoConfig().getTaskCount();
Review Comment:
> I am still sure that is the correct approach - autoscaler explicitly
changes taskCount and operates with different task counts configurations.
I'm fine with this switch.
I'm generally for using more static static configs when doing any kind of
algorithm as it helps reduce chance of races, increases
determinism/debuggability, etc. I would imagine in some cases there can be lots
of skew between `supervisor.getActiveTaskGroupsCount()` and
`supervisor.getIoConfig().getTaskCount()`, for example during roll-over. In
other words, I'm fine with reading a potentially slightly stale value as long
as it's generally consistent with the current world view.
--
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]