kfaraz commented on code in PR #20706:
URL: https://github.com/apache/druid/pull/20706#discussion_r4366005535


##########
indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisor.java:
##########
@@ -4066,17 +4072,15 @@ void maybeScaleDuringTaskRollover()
             "Updating taskCount for supervisor[%s] from [%d] to [%d] during 
rollover.",
             supervisorId, currentTaskCount, rolloverTaskCount
         );
-        isScalingTasksOnRollover.set(true);
-        try {
-          new DynamicAllocationTasksNotice(
-              () -> rolloverTaskCount,
-              () -> {},
-              emitter
-          ).handle();
-        }
-        finally {
-          isScalingTasksOnRollover.set(false);
-        }
+        handleDynamicAllocationTasksNotice(
+            () -> rolloverTaskCount,
+            () -> {},
+            true
+        );
+      } else if (rolloverTaskCount != SupervisorTaskAutoScaler.CANNOT_COMPUTE) 
{

Review Comment:
   I don't think this is entirely correct.
   
   For lagBased auto-scaler with cooldown > taskDuration, we do not attempt 
scaling on rollover, but we do not reset the cooldown either. So, as soon as 
the cooldown elapses, scaling will be attempted.
   
   As for the implementation of rollover scaling for lagBased, we can do that 
in a separate patch.



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