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 — Release channel when FixedChannelPool acquire is cancelled by Gimini-3 · Pull Request #17287 · netty/netty Conversation
Contributor
Motivation:
Modification: Complete the caller promise with Result: Cancelled acquires no longer leak a channel or an acquired slot, and pending acquires continue once the undelivered channel is returned. Fixes #9669. Validation:
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Gimini-3
marked this pull request as ready for review
|
There was an error while loading. Please reload this page.
🚨 TestLens detected 1 failed test 🚨Here is what you can do:
Test SummaryBuild PR / linux-x86_64-java11-awslc build > Netty/Codec/HTTP2
Build PR / macos-aarch64-java11-boringssl build > Netty/Transport/Native/KQueue
🏷️ Commit: 76fae38 Test FailuresKQueueDatagramUnicastIPv6MappedTest > testSimpleSendCompositeDirectByteBuf(TestInfo) (Netty/Transport/Native/KQueue in Build PR / macos-aarch64-java11-boringssl build)Muted TestsNote Checks are currently running using the configuration below. Select tests to mute in this pull request: 🔲 Http2ConnectionRoundtripTest > createStreamAfterReceiveGoAwayShouldNotSendGoAway() 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. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Could not create auto-port PR. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Port for 5.0 #17288 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Could not create auto-port PR. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Need #17289 to make it easier to backport change to 4.1 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Pr for 4:1 #17291 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…17288) Motivation: `FixedChannelPool` increments `acquiredChannelCount` before its internal acquire completes. If the caller cancels the original promise and the internal acquire succeeds, `setSuccess` throws and the acquired channel is neither returned nor closed. The slot remains occupied, pending acquires may stall, and pool close cannot reach the undelivered channel. Modification: Complete the caller promise with `trySuccess` and release the channel when the promise was already completed. Add deterministic coverage for cancellation before delivery, cancelled pending acquires, queue progression, slot accounting, and pool-close races. Result: Cancelled acquires no longer leak a channel or an acquired slot, and pending acquires continue once the undelivered channel is returned. Fixes #9669. Validation: - `./mvnw -pl transport -Dtest=FixedChannelPoolTest test` - `./mvnw -pl transport test` (394 tests, 0 failures, 0 errors, 9 skipped) --------- Co-authored-by: Gimin Kim <[email protected]>
…17291) Motivation: `FixedChannelPool` increments `acquiredChannelCount` before its internal acquire completes. If the caller cancels the original promise and the internal acquire succeeds, `setSuccess` throws and the acquired channel is neither returned nor closed. The slot remains occupied, pending acquires may stall, and pool close cannot reach the undelivered channel. Modification: Complete the caller promise with `trySuccess` and release the channel when the promise was already completed. Add deterministic coverage for cancellation before delivery, cancelled pending acquires, queue progression, slot accounting, and pool-close races. Result: Cancelled acquires no longer leak a channel or an acquired slot, and pending acquires continue once the undelivered channel is returned. Fixes #9669. Validation: - `./mvnw -pl transport -Dtest=FixedChannelPoolTest test` - `./mvnw -pl transport test` (394 tests, 0 failures, 0 errors, 9 skipped) --------- Co-authored-by: Gimin Kim <[email protected]>
…7569) ### Motivation `notifyConnect()` completes the acquire `Promise` with `trySuccess(...)` and releases the `Channel` if already completed. `notifyHealthCheck()`, the reuse path, still uses `setSuccess(...)`. `doHealthCheck` runs via `loop.execute(...)` when `acquire()` is called off its event loop, so a cancel can land while that task is queued, even with the stock `ACTIVE` checker. `setSuccess(...)` then throws into `closeAndFail(...)`: a healthy pooled `Channel` is closed and its `channelAcquired(...)` gets no `channelReleased(...)`. #17287 gave `FixedChannelPool` this guard. ### Modification `notifyHealthCheck()` mirrors `notifyConnect()`, plus a regression test on a hand-completed health check. ### Result Reverting just the source hunk fails that test on `releasedCount()`, 2 expected, 1 seen. With it, 34/34.
…s cancelled (#17578) Auto-port of #17569 to 4.1 Cherry-picked commit: 6b257ce --- ### Motivation `notifyConnect()` completes the acquire `Promise` with `trySuccess(...)` and releases the `Channel` if already completed. `notifyHealthCheck()`, the reuse path, still uses `setSuccess(...)`. `doHealthCheck` runs via `loop.execute(...)` when `acquire()` is called off its event loop, so a cancel can land while that task is queued, even with the stock `ACTIVE` checker. `setSuccess(...)` then throws into `closeAndFail(...)`: a healthy pooled `Channel` is closed and its `channelAcquired(...)` gets no `channelReleased(...)`. #17287 gave `FixedChannelPool` this guard. ### Modification `notifyHealthCheck()` mirrors `notifyConnect()`, plus a regression test on a hand-completed health check. ### Result Reverting just the source hunk fails that test on `releasedCount()`, 2 expected, 1 seen. With it, 34/34. --------- Co-authored-by: renechoi <[email protected]> Co-authored-by: Norman Maurer <[email protected]>
…) (netty#17291) Motivation: `FixedChannelPool` increments `acquiredChannelCount` before its internal acquire completes. If the caller cancels the original promise and the internal acquire succeeds, `setSuccess` throws and the acquired channel is neither returned nor closed. The slot remains occupied, pending acquires may stall, and pool close cannot reach the undelivered channel. Modification: Complete the caller promise with `trySuccess` and release the channel when the promise was already completed. Add deterministic coverage for cancellation before delivery, cancelled pending acquires, queue progression, slot accounting, and pool-close races. Result: Cancelled acquires no longer leak a channel or an acquired slot, and pending acquires continue once the undelivered channel is returned. Fixes netty#9669. Validation: - `./mvnw -pl transport -Dtest=FixedChannelPoolTest test` - `./mvnw -pl transport test` (394 tests, 0 failures, 0 errors, 9 skipped) --------- Co-authored-by: Gimin Kim <[email protected]>
…s cancelled (netty#17578) Auto-port of netty#17569 to 4.1 Cherry-picked commit: 6b257ce --- ### Motivation `notifyConnect()` completes the acquire `Promise` with `trySuccess(...)` and releases the `Channel` if already completed. `notifyHealthCheck()`, the reuse path, still uses `setSuccess(...)`. `doHealthCheck` runs via `loop.execute(...)` when `acquire()` is called off its event loop, so a cancel can land while that task is queued, even with the stock `ACTIVE` checker. `setSuccess(...)` then throws into `closeAndFail(...)`: a healthy pooled `Channel` is closed and its `channelAcquired(...)` gets no `channelReleased(...)`. netty#17287 gave `FixedChannelPool` this guard. ### Modification `notifyHealthCheck()` mirrors `notifyConnect()`, plus a regression test on a hand-completed health check. ### Result Reverting just the source hunk fails that test on `releasedCount()`, 2 expected, 1 seen. With it, 34/34. --------- Co-authored-by: renechoi <[email protected]> Co-authored-by: Norman Maurer <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
IllegalStateException: complete already on notifyListener / operationComplete
There was an error while loading. Please reload this page.