kfaraz commented on code in PR #20706:
URL: https://github.com/apache/druid/pull/20706#discussion_r4365893987
##########
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 {
+ // Reset last scale time even if taskCount is not being changed.
+ // Otherwise, we might have a scaling event right after the task
rollover.
+ dynamicTriggerLastScaleRunTime = System.currentTimeMillis();
Review Comment:
Fair point. Thanks @capistrant for also calling this out.
I tend to forget the lagBased auto-scaler sometimes. 😛
I think in a future patch, we can try to enable task count change on
rollover for `lagBased` auto-scaler as well.
--
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]