Skip to content

supervisor/autoscaler: Skip scaling when partitions are less than minTaskCount#17335

Merged
suneet-s merged 1 commit intoapache:masterfrom
ac9817:skip/scale
Oct 15, 2024
Merged

supervisor/autoscaler: Skip scaling when partitions are less than minTaskCount#17335
suneet-s merged 1 commit intoapache:masterfrom
ac9817:skip/scale

Conversation

@ac9817
Copy link
Copy Markdown
Contributor

@ac9817 ac9817 commented Oct 11, 2024

Description

When supervisors are configured with incorrect lag based scaling config, where minTaskCount is greater than the partitions on the stream, it always tries to issue scaling actions which are redundant but causes tasks to get published more frequently than needed.

We are handling this situation when maxTaskCount is greater than partitions, this PR uses the same check for minTaskCount too.


Key changed/added classes in this PR
  • LagBasedAutoScaler

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.

public void testSeekableStreamSupervisorSpecWithScaleInThresholdGreaterThanPartitions() throws InterruptedException
{
EasyMock.expect(spec.getSupervisorStateManagerConfig()).andReturn(supervisorConfig).anyTimes();
EasyMock.expect(spec.getDataSchema()).andReturn(getDataSchema()).anyTimes();

Check notice

Code scanning / CodeQL

Deprecated method or constructor invocation

Invoking [SeekableStreamSupervisorSpec.getDataSchema](1) should be avoided because it has been deprecated.
@suneet-s suneet-s merged commit c57bd3b into apache:master Oct 15, 2024
@ac9817 ac9817 deleted the skip/scale branch October 15, 2024 21:37
ac9817 added a commit to ac9817/druid that referenced this pull request Oct 16, 2024
suneet-s pushed a commit that referenced this pull request Oct 17, 2024
…e actions (#17356)

* superviosr/autoscaler: Fix clearing of collected lags on skipped scale actions

* comments

* supervisor/autoscaler: Skip scaling when partitions are less than minTaskCount (#17335)

* Fix pip installation after ubuntu upgrade (#17358)

* fix tests

---------

Co-authored-by: Pranav <pranavbhole@gmail.com>
@adarshsanjeev adarshsanjeev added this to the 32.0.0 milestone Jan 16, 2025
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.

5 participants