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 — Codec-compression: Add backpressure decompression handlers by yawkat · Pull Request #17161 · netty/netty Conversation
|
| File | Description |
|---|---|
| codec-compression/src/main/java/io/netty/handler/codec/compression/AbstractBackpressureDecompressionHandler.java | New shared implementation for backpressure-aware decompression with manual-read support. |
| codec-compression/src/main/java/io/netty/handler/codec/compression/BackpressureDecompressionHandler.java | Concrete ChannelHandler adapter that wires a Decompressor into the shared backpressure logic. |
| codec-compression/src/main/java/io/netty/handler/codec/compression/BackpressureGauge.java | New backpressure accounting/config component (messages/bytes per read). |
| codec-compression/src/test/java/io/netty/handler/codec/compression/BackpressureDecompressionHandlerTest.java | New focused tests for backpressure, end-of-input, message replay, and re-entrant removal. |
| codec-compression/src/test/java/io/netty/handler/codec/compression/Bzip2DecoderTest.java | Adjust teardown/exception handling path for tests that expect failures. |
| codec-compression/src/test/java/io/netty/handler/codec/compression/Bzip2DecompressorHandlerIntegrationTest.java | Runs existing Bzip2 integration suite through BackpressureDecompressionHandler. |
| codec-compression/src/test/java/io/netty/handler/codec/compression/Bzip2DecompressorHandlerTest.java | Runs existing Bzip2 decoder tests through BackpressureDecompressionHandler. |
| codec-compression/src/test/java/io/netty/handler/codec/compression/FastLzDecompressorHandlerIntegrationTest.java | Runs existing FastLZ integration suite through BackpressureDecompressionHandler. |
| codec-compression/src/test/java/io/netty/handler/codec/compression/SnappyDecompressorHandlerIntegrationTest.java | Runs existing Snappy integration suite through BackpressureDecompressionHandler. |
| codec-compression/src/test/java/io/netty/handler/codec/compression/SnappyDecompressorHandlerJumboSizeIntegrationTest.java | Runs existing Snappy jumbo-size integration suite through BackpressureDecompressionHandler. |
| codec-compression/src/test/java/io/netty/handler/codec/compression/SnappyFrameDecoderTest.java | Refactors to allow swapping decoder implementation in derived tests. |
| codec-compression/src/test/java/io/netty/handler/codec/compression/SnappyFrameDecompressorHandlerTest.java | Runs existing Snappy frame decoder tests through BackpressureDecompressionHandler. |
codec-compression/src/main/java/io/netty/handler/codec/compression/AbstractBackpressureDecompressionHandler.java:247
reading = true, this second guard-return (after computing decompressor status) can return without resetting reading to false if heldBack is changed reentrantly, leaving the handler in an inconsistent state. if (this.heldBack != heldBack) {
return false;
}
codec-compression/src/main/java/io/netty/handler/codec/compression/AbstractBackpressureDecompressionHandler.java:253
heldBack is empty and no messages were written, the method returns false while reading is still true. This violates the method’s own assert !reading contract for future invocations and can prevent later channelRead(...) calls from resetting the per-read bookkeeping. if (heldBack.isEmpty() && !anyMessageWrittenSinceReadStart) {
heldBack.recycle();
return false;
} else {
codec-compression/src/main/java/io/netty/handler/codec/compression/AbstractBackpressureDecompressionHandler.java:274
NEED_OUTPUT path, if no message was written, the method calls ctx.read() and returns false but leaves reading = true. Resetting reading before issuing a read avoids incorrectly treating the subsequent inbound read as re-entrant within the previous read cycle. ctx.read();
return false;
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Focused follow-up on manual-read accounting and trailing input handling. I did not raise the handler-removal or non-ByteBuf points; the latter is consistent with this handler's explicit ByteBuf-only contract despite differing from ByteToMessageDecoder pass-through behavior.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <[email protected]> Co-Authored-By: multicode <[email protected]>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <[email protected]> Co-Authored-By: multicode <[email protected]>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <[email protected]> Co-Authored-By: multicode <[email protected]>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <[email protected]> Co-Authored-By: multicode <[email protected]>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <[email protected]> Co-Authored-By: multicode <[email protected]>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <[email protected]> Co-Authored-By: multicode <[email protected]>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <[email protected]> Co-Authored-By: multicode <[email protected]>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <[email protected]> Co-Authored-By: multicode <[email protected]>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <[email protected]> Co-Authored-By: multicode <[email protected]>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <[email protected]> Co-Authored-By: multicode <[email protected]>
There was an error while loading. Please reload this page.
🔎 No tests executed 🔎🏷️ Commit: 83524f1 Learn more about TestLens at testlens.app/docs. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Motivation: Most of this PR has been split out and merged to 4.2 (#16745, #17145-#17155), and the backpressure handler is under review in #17161. The split versions received review fixes that this branch does not have, which left the PR conflicting with 4.2 in every decompressor. Modification: * Take the merged 4.2 decompressor implementations and the #17161 version of the backpressure handler infrastructure. * Re-apply the remaining unmerged parts of this PR on top: HTTP/1.1 HttpDecompressionHandler, HTTP/2 DecompressingFrameListener, their tests, and deprecation of the legacy decoders. * Drop JZlib support (JZlibDecompressor, ZlibDecompressor base class, ZlibCodecFactory decompressor builder). HttpDecompressionHandler uses JdkZlibDecompressor directly. * Restore BackpressureGauge.relieveBackpressure(long), which #17161 removed but DecompressingFrameListener needs for HTTP/2 flow-control credit. Result: The PR applies cleanly on 4.2 again and only carries the unmerged parts of #16743. Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.