Cost-based autoscaler: allow scaling action only when metrics are available#19028
Merged
kfaraz merged 6 commits intoapache:masterfrom Feb 19, 2026
Merged
Cost-based autoscaler: allow scaling action only when metrics are available#19028kfaraz merged 6 commits intoapache:masterfrom
kfaraz merged 6 commits intoapache:masterfrom
Conversation
kfaraz
reviewed
Feb 18, 2026
Contributor
There was a problem hiding this comment.
Instead of this, the test should verify that scaling action is skipped when moving average rate is not available. The test should care less about the internal implementation details of the target and more about its overall behaviour.
Contributor
Author
There was a problem hiding this comment.
This test was added mostly to satisfy jacoco test coverage :)
Contributor
There was a problem hiding this comment.
😛 yay, jacoco!
Let's take the opportunity to make it a useful test then. 🙂
kfaraz
reviewed
Feb 18, 2026
Contributor
kfaraz
left a comment
There was a problem hiding this comment.
Minor suggestion to improve test behaviour.
kfaraz
reviewed
Feb 18, 2026
| public int computeTaskCountForScaleAction() | ||
| { | ||
| lastKnownMetrics = collectMetrics(); | ||
| if (lastKnownMetrics == null) { |
kfaraz
reviewed
Feb 18, 2026
...java/org/apache/druid/indexing/seekablestream/supervisor/autoscaler/CostBasedAutoScaler.java
Show resolved
Hide resolved
44286a6 to
c69f335
Compare
kfaraz
approved these changes
Feb 18, 2026
Contributor
|
Merged the PR since the failure in the docker tests is unrelated and has been seen on other PRs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Default processing rate was a crutch that allowed autoscaler to start scaling actions earlier than the first metrics became available. In fact, it is confusing parameter and actually a crutch, which was removed in that patch.
This PR has: