Repository navigation
Reset busy counters after triggering an auto-scale-up decision - #17538
Merged
Merged
Conversation
Motivation: AutoScalingEventExecutorChooserFactory suspends idle executors and resets their busy/idle cycle counters once a scale-down decision is made, so they need a fresh patience period before triggering another scaling decision. The scale-up path had no equivalent reset: once an executor's busy-cycle counter crossed scalingPatienceCycles, it kept incrementing on every following cycle it remained busy, so the same executor could keep triggering further scale-ups on its own without any additional executor becoming busy. This causes the group to overshoot the number of active executors that the actual load justifies, and is the cause of intermittent CI failures in AutoScalingEventExecutorChooserFactoryTest.testScaleUp (e.g. expected 2 active executors but found 3). Modifications: - Track the executors that are consistently busy in a list, mirroring the existing consistentlyIdleChildren list, instead of only counting them. - After using that list to decide on a scale-up, reset the busy and idle cycle counters of the contributing executors so each one needs another full patience period of sustained load before it can justify a further scale-up. Result: A single sustained busy executor scales the group up exactly once per patience period instead of repeatedly ramping up on its own.
franz1981
approved these changes
Sep 18, 2026
franz1981
left a comment
Contributor
There was a problem hiding this comment.
Lgtm @isaacrivriv WDYT?
isaacrivriv
approved these changes
Sep 18, 2026
isaacrivriv
left a comment
Contributor
There was a problem hiding this comment.
Makes sense to me, not sure how that was missed for the consistentlyBusyChildren but done for the consistentlyIdleChildren so a similar logic to handle the same issues make sense.
Contributor
Member
Author
|
@isaacrivriv yes sure. |
✅ All tests passed ✅🏷️ Commit: 25c8c2c Learn more about TestLens at testlens.app/docs. |
Contributor
|
Auto-port PR for 5.0: #17547 |
normanmaurer
added a commit
that referenced
this pull request
Sep 20, 2026
…decision (#17547) Auto-port of #17538 to 5.0 Cherry-picked commit: 8af38d1 --- Motivation: AutoScalingEventExecutorChooserFactory suspends idle executors and resets their busy/idle cycle counters once a scale-down decision is made, so they need a fresh patience period before triggering another scaling decision. The scale-up path had no equivalent reset: once an executor's busy-cycle counter crossed scalingPatienceCycles, it kept incrementing on every following cycle it remained busy, so the same executor could keep triggering further scale-ups on its own without any additional executor becoming busy. This causes the group to overshoot the number of active executors that the actual load justifies, and is the cause of intermittent CI failures in AutoScalingEventExecutorChooserFactoryTest.testScaleUp (e.g. expected 2 active executors but found 3). Modifications: - Track the executors that are consistently busy in a list, mirroring the existing consistentlyIdleChildren list, instead of only counting them. - After using that list to decide on a scale-up, reset the busy and idle cycle counters of the contributing executors so each one needs another full patience period of sustained load before it can justify a further scale-up. Result: A single sustained busy executor scales the group up exactly once per patience period instead of repeatedly ramping up on its own. Co-authored-by: Norman Maurer <[email protected]>
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.
Motivation:
AutoScalingEventExecutorChooserFactory suspends idle executors and
resets their busy/idle cycle counters once a scale-down decision is
made, so they need a fresh patience period before triggering another
scaling decision. The scale-up path had no equivalent reset: once an
executor's busy-cycle counter crossed scalingPatienceCycles, it kept
incrementing on every following cycle it remained busy, so the same
executor could keep triggering further scale-ups on its own without
any additional executor becoming busy. This causes the group to
overshoot the number of active executors that the actual load
justifies, and is the cause of intermittent CI failures in
AutoScalingEventExecutorChooserFactoryTest.testScaleUp (e.g. expected
2 active executors but found 3).
Modifications:
the existing consistentlyIdleChildren list, instead of only counting
them.
idle cycle counters of the contributing executors so each one needs
another full patience period of sustained load before it can justify
a further scale-up.
Result:
A single sustained busy executor scales the group up exactly once per
patience period instead of repeatedly ramping up on its own.