[ISSUE #16399] Close late input after streaming decoder shutdown - #16400
Open
dong0713 wants to merge 2 commits into
Open
[ISSUE #16399] Close late input after streaming decoder shutdown#16400dong0713 wants to merge 2 commits into
dong0713 wants to merge 2 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 3.3 #16400 +/- ##
============================================
+ Coverage 60.87% 60.93% +0.05%
Complexity 11766 11766
============================================
Files 1953 1953
Lines 89273 89281 +8
Branches 13473 13473
============================================
+ Hits 54346 54399 +53
+ Misses 29333 29284 -49
- Partials 5594 5598 +4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
dong0713
force-pushed
the
fix/default-streaming-decoder-leak
branch
from
July 29, 2026 02:42
6dbb1cd to
434e777
Compare
Contributor
|
What about |
Contributor
Ooops , didn't see that , @dong0713 , here is the path "org.apache.dubbo.remoting.websocket". |
Mirror the DefaultStreamingDecoder fix for FinalFragmentStreamingDecoder: when decode() is called after the decoder is closing or closed, the input stream is now closed to release the underlying pooled ByteBuf wrapped with releaseOnClose. Add regression tests covering the closing and closed paths.
Author
|
|
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.
What is the purpose of the change
Fixes #16399. Mirror the #16391 fix for both streaming decoder implementations: when
decode()is called after the decoder has been shut down, the input stream is now closed to release the underlying pooledByteBufwrapped withreleaseOnClose = true.#16391 introduced an early-return guard in both decoders but did not close the input on that guard, so the
ByteBufleaked. This PR closes that gap in both implementations.Brief changelog
1.
DefaultStreamingDecoder(dubbo-remoting-http12)closed == trueearly-return branch).DecodeException(consistent with [ISSUE #16389] Close late input after streaming decoder shutdown #16391).2.
FinalFragmentStreamingDecoder(dubbo-remoting-websocket)closing || closedearly-return branch) — the symmetric counterpart of theDefaultStreamingDecoderfix, in the websocket module.Verifying this change
DefaultStreamingDecoderTest(http12): closed-path + exception propagation.FinalFragmentStreamingDecoderTest(websocket, new test dir): closed-path + closing-path + exception propagation.