Skip to content

refactor: clean up min/max task count limits in streaming task autoscaler#19369

Draft
jtuglu1 wants to merge 1 commit intoapache:masterfrom
jtuglu1:followup/autoscaler-contract-cleanup
Draft

refactor: clean up min/max task count limits in streaming task autoscaler#19369
jtuglu1 wants to merge 1 commit intoapache:masterfrom
jtuglu1:followup/autoscaler-contract-cleanup

Conversation

@jtuglu1
Copy link
Copy Markdown
Contributor

@jtuglu1 jtuglu1 commented Apr 23, 2026

Description

This makes auto-scaling min/max handling done in a single place (since it is common logic shared by all auto-scalers) in the supervisor dynamic task call action. This also cleans up the task auto scaler contract of returning -1 only when the scaler failed to produce a desired task count (lack of metrics, etc.). Otherwise, it is expected to return a task count that the supervisor will then audit/clamp.

Release note

Clean up min/max task count limits in streaming task autoscaler


This PR has:

  • been self-reviewed.
  • added documentation for new or modified features or behaviors.
  • a release note entry in the PR description.
  • added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
  • added or updated version, license, or notice information in licenses.yaml
  • added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
  • added unit tests or modified existing tests to cover new code paths, ensuring the threshold for code coverage is met.
  • added integration tests.
  • been tested in a test Druid cluster.

return getIOConfig(taskCount, scaleOut, 2);
}

private SeekableStreamSupervisorIOConfig getIOConfig(int taskCount, boolean scaleOut, int maxTaskCount)
@jtuglu1 jtuglu1 requested a review from Fly-Style April 23, 2026 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants