Skip to content

Skip streaming auto-scaling action if supervisor is idle#14773

Merged
jon-wei merged 2 commits intoapache:masterfrom
jon-wei:fix_streaming_idle_auto_scaling
Aug 18, 2023
Merged

Skip streaming auto-scaling action if supervisor is idle#14773
jon-wei merged 2 commits intoapache:masterfrom
jon-wei:fix_streaming_idle_auto_scaling

Conversation

@jon-wei
Copy link
Contributor

@jon-wei jon-wei commented Aug 7, 2023

This PR fixes an issue where the streaming supervisor task auto-scaling will continue to submit taskCount changes when the supervisor is idle (with 0 running tasks in IDLE state, the auto-scaling believes it needs to update the taskCount to the desired count). This can lead to a large buildup of redundant supervisor specs in the supervisor history.

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.

…blestream/supervisor/SeekableStreamSupervisor.java

Co-authored-by: Abhishek Radhakrishnan <abhishek.rb19@gmail.com>
{
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.
return;
}
if (SupervisorStateManager.BasicState.IDLE == getState()) {
log.info(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How often does this get logged? Seems like once a minute by default? Should we lower to debug?

@jon-wei jon-wei merged commit a8eaa1e into apache:master Aug 18, 2023
@LakshSingla LakshSingla added this to the 28.0 milestone Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants