Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Oct 15, 2024

Conversation

adithyachakilam
Copy link
Contributor

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

Invoking
SeekableStreamSupervisorSpec.getDataSchema
should be avoided because it has been deprecated.
@suneet-s suneet-s merged commit c57bd3b into apache:master Oct 15, 2024
90 checks passed
@adithyachakilam adithyachakilam deleted the skip/scale branch October 15, 2024 21:37
adithyachakilam added a commit to adithyachakilam/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.

4 participants