FrankChen021 commented on code in PR #20706:
URL: https://github.com/apache/druid/pull/20706#discussion_r4365942684
##########
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:
[P2] Lag-based autoscaling never participates in rollover scaling
**Finding:** LagBasedAutoScaler does not override
computeTaskCountForRollover(), so it returns
SupervisorTaskAutoScaler.CANNOT_COMPUTE and this branch only leaves the
cooldown untouched; no rollover allocation is attempted. When minScaleUpDelay
or minScaleDownDelay is longer than taskDuration, a recent regular scale
therefore leaves a lag-based supervisor unable to react at the next rollover,
contradicting the low-sensitivity behavior documented in the PR and allowing
lag to grow until the cooldown expires.
**Suggestion:** Implement a rollover recommendation for LagBasedAutoScaler
using its latest lag state, or explicitly scope and document rollover behavior
to strategies that support it and add coverage for the unsupported
configuration.
--
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]