GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Auto-port 5.0: Reset busy counters after triggering an auto-scale-up decision by netty-project-bot · Pull Request #17547 · netty/netty

Conversation

@netty-project-bot

@netty-project-bot netty-project-bot commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@normanmaurer @netty-project-bot
Reset busy counters after triggering an auto-scale-up decision (#17538)
e7b50a3
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.

(cherry picked from commit 8af38d1)
@netty-project-bot netty-project-bot mentioned this pull request Sep 19, 2026
Reset busy counters after triggering an auto-scale-up decision #17538
Merged
@testlens-app

testlens-app Bot commented Sep 19, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

🚨 TestLens detected 2 failed tests 🚨

Here is what you can do:

  1. Inspect the test failures carefully.
  2. If you are convinced that some of the tests are flaky, you can mute them below.
  3. Finally, trigger a rerun by checking the rerun checkbox.

Test Summary

Build PR / linux-x86_64-java25 build > Netty/Handler

Test Runs Flakiness
OpenSslPrivateKeyMethodTest > testPrivateKeyMethod(boolean, boolean, boolean) > 6: delegate = false, async = true, newThread=false ❌ 0% 🟢

Build PR / linux-x86_64-java25-graal build > Netty/Codec/HTTP2

Test Runs Flakiness
Http2ConnectionRoundtripTest > listenerIsNotifiedOfGoawayBeforeStreamsAreRemovedFromTheConn… ❌ 1% 🟡

🏷️ Commit: e7b50a3
▶️ Tests: 212331 executed
⚪️ Checks: 12/12 completed

Test Failures

OpenSslPrivateKeyMethodTest > testPrivateKeyMethod(boolean, boolean, boolean) > 6: delegate = false, async = true, newThread=false (Netty/Handler in Build PR / linux-x86_64-java25 build)
java.util.concurrent.CompletionException: java.lang.IllegalStateException
	at io.netty.util.concurrent.DefaultPromise.rethrowIfFailed(DefaultPromise.java:715)
	at io.netty.util.concurrent.DefaultPromise.sync(DefaultPromise.java:396)
	at io.netty.handler.ssl.OpenSslPrivateKeyMethodTest.testPrivateKeyMethod(OpenSslPrivateKeyMethodTest.java:313)
	at java.base/java.lang.reflect.Method.invoke(Method.java:565)
	at java.base/java.util.Optional.ifPresent(Optional.java:178)
	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:186)
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:214)
	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:186)
	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:186)
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:214)
	at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1716)
	at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:803)
	at java.base/java.util.stream.ReferencePipeline$7$1FlatMap.accept(ReferencePipeline.java:293)
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:214)
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:214)
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:214)
	at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:1024)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:570)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:560)
	at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:153)
	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:176)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:265)
	at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:632)
	at java.base/java.util.stream.ReferencePipeline$7$1FlatMap.accept(ReferencePipeline.java:293)
	at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1716)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:570)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:560)
	at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:153)
	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:176)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:265)
	at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:632)
	at java.base/java.util.stream.ReferencePipeline$7$1FlatMap.accept(ReferencePipeline.java:293)
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:214)
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:214)
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:214)
	at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1716)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:570)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:560)
	at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:153)
	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:176)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:265)
	at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:632)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:511)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1450)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:2019)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:187)
Caused by: java.lang.IllegalStateException
	at io.netty.handler.ssl.OpenSslPrivateKeyMethodTest$4$1.channelInactive(OpenSslPrivateKeyMethodTest.java:285)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:206)
	at io.netty.handler.codec.ByteToMessageDecoder.channelInputClosed(ByteToMessageDecoder.java:431)
	at io.netty.handler.codec.ByteToMessageDecoder.channelInactive(ByteToMessageDecoder.java:394)
	at io.netty.handler.ssl.SslHandler.channelInactive(SslHandler.java:1145)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:206)
	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelInactive(DefaultChannelPipeline.java:1423)
	at io.netty.channel.DefaultChannelPipeline.fireChannelInactive(DefaultChannelPipeline.java:844)
	at io.netty.channel.AbstractChannel$IoTransportImpl$6.lambda$run$0(AbstractChannel.java:813)
	at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:624)
	at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:583)
	at io.netty.util.concurrent.DefaultPromise.notifyListenersAndHandlers(DefaultPromise.java:470)
	at io.netty.util.concurrent.DefaultPromise.setValue0(DefaultPromise.java:678)
	at io.netty.util.concurrent.DefaultPromise.setSuccess0(DefaultPromise.java:667)
	at io.netty.util.concurrent.DefaultPromise.setSuccess(DefaultPromise.java:110)
	at io.netty.channel.local.LocalChannel.doDeregister(LocalChannel.java:177)
	at io.netty.channel.AbstractChannel$IoTransportImpl$6.run(AbstractChannel.java:828)
	at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:138)
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:131)
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:529)
	at io.netty.channel.SingleThreadIoEventLoop.run(SingleThreadIoEventLoop.java:201)
	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:1159)
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.base/java.lang.Thread.run(Thread.java:1474)
Http2ConnectionRoundtripTest > listenerIsNotifiedOfGoawayBeforeStreamsAreRemovedFromTheConnection() (Netty/Codec/HTTP2 in Build PR / linux-x86_64-java25-graal build)
org.opentest4j.AssertionFailedError: expected: <true> but was: <false>
	at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)
	at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
	at org.junit.jupiter.api.AssertTrue.failNotTrue(AssertTrue.java:63)
	at org.junit.jupiter.api.AssertTrue.assertTrue(AssertTrue.java:36)
	at org.junit.jupiter.api.AssertTrue.assertTrue(AssertTrue.java:31)
	at org.junit.jupiter.api.Assertions.assertTrue(Assertions.java:183)
	at io.netty.handler.codec.http2.Http2ConnectionRoundtripTest.listenerIsNotifiedOfGoawayBeforeStreamsAreRemovedFromTheConnection(Http2ConnectionRoundtripTest.java:994)
	at java.base/java.lang.reflect.Method.invoke(Method.java:565)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:511)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.tryRemoveAndExec(ForkJoinPool.java:1490)
	at java.base/java.util.concurrent.ForkJoinPool.helpJoin(ForkJoinPool.java:2248)
	at java.base/java.util.concurrent.ForkJoinTask.awaitDone(ForkJoinTask.java:499)
	at java.base/java.util.concurrent.ForkJoinTask.join(ForkJoinTask.java:666)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:511)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.tryRemoveAndExec(ForkJoinPool.java:1490)
	at java.base/java.util.concurrent.ForkJoinPool.helpJoin(ForkJoinPool.java:2248)
	at java.base/java.util.concurrent.ForkJoinTask.awaitDone(ForkJoinTask.java:499)
	at java.base/java.util.concurrent.ForkJoinTask.join(ForkJoinTask.java:666)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:511)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1450)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:2019)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:187)
expected actual
true false

Rerun Controls

Select tests to mute in this pull request:

  • Http2ConnectionRoundtripTest > listenerIsNotifiedOfGoawayBeforeStreamsAreRemovedFromTheConnection()
  • OpenSslPrivateKeyMethodTest > testPrivateKeyMethod(boolean, boolean, boolean)

Reuse successful test results:

  • ♻️ Only rerun the tests that failed or were muted before

Click the checkbox to trigger a rerun:

  • Rerun jobs

Learn more about TestLens at testlens.app/docs.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@normanmaurer normanmaurer added this to the 5.0.0.Final milestone Sep 20, 2026
@normanmaurer
normanmaurer merged commit 89e5e85 into 5.0 Sep 20, 2026
11 of 13 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@normanmaurer
normanmaurer deleted the auto-port-pr-17538-to-5.0 branch September 20, 2026 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

5.0.0.Final

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@netty-project-bot @normanmaurer
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.