GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — pipeline5 by normanmaurer · Pull Request #17671 · netty/netty pipeline5 #17671New issueHave a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community. By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails. Already on GitHub? Sign in to your account
Closed
Uh oh!
There was an error while loading. Please reload this page.
Closed
pipeline5 #17671Changes from 1 commit
Commits
File filterConversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading. Please reload this page. Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page. Diff viewDiff view
Next
Don't leak FixedChannelPool slots on unrelated IllegalArgumentExcepti…
…on (#17609) Motivation: `FixedChannelPool.release(...)` does not give back the acquired slot if the release failed with an `IllegalArgumentException`: ```java // Check if the exception was not because of we passed the Channel to the wrong pool. if (!(cause instanceof IllegalArgumentException)) { decrementAndRunTaskQueue(); } ``` `SimpleChannelPool` uses `IllegalArgumentException` for "Channel ... was not acquired from this ChannelPool", and this check has been there since the pools were added. But the release also fails with any exception thrown by user code, for example `ChannelPoolHandler.channelReleased()`, `ChannelHealthChecker.isHealthy()` when the release health check is enabled, or an overridden `offerChannel()`. All of these go through `closeAndFail(...)`. If that exception is an `IllegalArgumentException`, the channel is closed but still counted as acquired. The slot is lost forever: with `maxConnections = 1` every later `acquire()` waits forever or times out. Modification: - `SimpleChannelPool` fails the release of a channel that was not acquired from the pool with a new package-private `ChannelNotAcquiredFromPoolException` (with a `serialVersionUID`). It extends `IllegalArgumentException` and keeps the message and the stack trace, so users who catch or assert `IllegalArgumentException` are not affected. The only visible difference is the class name: `toString()` and logged stack traces now show `io.netty.channel.pool.SimpleChannelPool$ChannelNotAcquiredFromPoolException: Channel ... was not acquired from this ChannelPool` instead of `java.lang.IllegalArgumentException: ...`. - `FixedChannelPool` only skips the decrement for that exception. - Add `FixedChannelPoolTest.testReleaseFailsWithIllegalArgumentExceptionFromHandler`: `maxConnections = 1` with a handler whose `channelReleased()` throws an `IllegalArgumentException`. The release must fail with that exception, the acquired count must drop to 0, and the next `acquire()` must succeed. - `testReleaseDifferentPool` still expects an `IllegalArgumentException`, and now also asserts `pool2.acquiredChannelCount() == 0` after the failed release, so the wrong-pool release still does not give back a slot of the pool it was released to. Result: A release that fails for any reason other than "not acquired from this pool" always gives back its slot, so a buggy handler or health checker can no longer shrink a `FixedChannelPool` for good.
Uh oh!
There was an error while loading. Please reload this page.
commit eb25c1bbf01022298f762a98052a362ecc3fb0b2
There are no files selected for viewing
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. |