Repository navigation
POOL: Close active unhealthy channels on release - #17306
Merged
normanmaurer merged 1 commit intoAug 24, 2026
Merged
Conversation
Gimini-3
marked this pull request as ready for review
August 20, 2026 07:59
✅ All tests passed ✅Test SummaryBuild PR / macos-x86_64-java11-boringssl build > Netty/Transport/Native/KQueue
🏷️ Commit: 42b75a3 Learn more about TestLens at testlens.app/docs. |
Contributor
|
Auto-port PR for 5.0: #17318 |
Contributor
|
Auto-port PR for 4.1: #17319 |
normanmaurer
added a commit
that referenced
this pull request
Aug 25, 2026
Auto-port of #17306 to 4.1 Cherry-picked commit: 2f8818f --- Motivation: When a custom `ChannelHealthChecker` reports an active channel as unhealthy during release, `SimpleChannelPool` removes the channel from pool ownership and does not return it to storage, but leaves it open. The release future still succeeds, so the active channel is no longer owned by either the caller or the pool. Modification: - Close channels rejected by the release health check after invoking `channelReleased()`. - Add a regression test with a custom health checker that rejects an active channel and verifies callback ordering, release success, and channel closure. Result: Active unhealthy channels are successfully discarded without changing the `channelReleased()` callback ordering or release promise semantics. Tests: `./mvnw -pl transport -Dtest=SimpleChannelPoolTest,FixedChannelPoolTest test` --------- Co-authored-by: Gimin Kim <[email protected]> Co-authored-by: Norman Maurer <[email protected]>
normanmaurer
added a commit
that referenced
this pull request
Aug 25, 2026
Auto-port of #17306 to 5.0 Cherry-picked commit: 2f8818f --- Motivation: When a custom `ChannelHealthChecker` reports an active channel as unhealthy during release, `SimpleChannelPool` removes the channel from pool ownership and does not return it to storage, but leaves it open. The release future still succeeds, so the active channel is no longer owned by either the caller or the pool. Modification: - Close channels rejected by the release health check after invoking `channelReleased()`. - Add a regression test with a custom health checker that rejects an active channel and verifies callback ordering, release success, and channel closure. Result: Active unhealthy channels are successfully discarded without changing the `channelReleased()` callback ordering or release promise semantics. Tests: `./mvnw -pl transport -Dtest=SimpleChannelPoolTest,FixedChannelPoolTest test` --------- Co-authored-by: Gimin Kim <[email protected]> Co-authored-by: Norman Maurer <[email protected]>
2 of 11 tasks
Closed
lltopk
pushed a commit
to lltopk/netty
that referenced
this pull request
Oct 24, 2026
…y#17319) Auto-port of netty#17306 to 4.1 Cherry-picked commit: 2f8818f --- Motivation: When a custom `ChannelHealthChecker` reports an active channel as unhealthy during release, `SimpleChannelPool` removes the channel from pool ownership and does not return it to storage, but leaves it open. The release future still succeeds, so the active channel is no longer owned by either the caller or the pool. Modification: - Close channels rejected by the release health check after invoking `channelReleased()`. - Add a regression test with a custom health checker that rejects an active channel and verifies callback ordering, release success, and channel closure. Result: Active unhealthy channels are successfully discarded without changing the `channelReleased()` callback ordering or release promise semantics. Tests: `./mvnw -pl transport -Dtest=SimpleChannelPoolTest,FixedChannelPoolTest test` --------- Co-authored-by: Gimin Kim <[email protected]> Co-authored-by: Norman Maurer <[email protected]>
Closed
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:
When a custom
ChannelHealthCheckerreports an active channel as unhealthy during release,SimpleChannelPoolremoves the channel from pool ownership and does not return it to storage, but leaves it open. The release future still succeeds, so the active channel is no longer owned by either the caller or the pool.Modification:
channelReleased().Result:
Active unhealthy channels are successfully discarded without changing the
channelReleased()callback ordering or release promise semantics.Tests:
./mvnw -pl transport -Dtest=SimpleChannelPoolTest,FixedChannelPoolTest test