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 finee with this switch.
   
   I'm generally for using static configs when doing the auto-scaling as it 
helps reduce chance of races, 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 a) it's not too stale b) it's consistent.
   



##########
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 static configs when doing the auto-scaling as it 
helps reduce chance of races, 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 a) it's not too stale b) it's consistent.
   



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