cyforkk opened a new pull request, #16406: URL: https://github.com/apache/dubbo/pull/16406
Fixes #16399 ## What is the purpose of the change `DefaultStreamingDecoder.decode()` does not close the input stream when the decoder has already been closed (`closed == true`). In the Triple HTTP/2 path, DATA frames are wrapped in `ByteBufInputStream(content, true)` (i.e., `releaseOnClose = true`), meaning the underlying pooled `ByteBuf` is released only when `InputStream.close()` is called. If a late DATA frame arrives asynchronously after the decoder has started closing, the `ByteBuf` is never released, causing a leak. This is the exact same bug pattern as #16389, which was fixed by #16391 for `LengthFieldStreamingDecoder`. This PR mirrors that fix for `DefaultStreamingDecoder`. ## Brief changelog - Close input streams received in `decode()` when the decoder is closed. - Propagate input close failures as `DecodeException`. - Add regression coverage for both `close()` and `onStreamClosed()` decoder states. ## Verifying this change - `DefaultStreamingDecoderTest`: 2 tests passed. - `LengthFieldStreamingDecoderTest`: 2 tests passed. - All `dubbo-remoting-http12` tests: 23 tests passed, 2 skipped. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
