chaoyoung opened a new pull request, #16583: URL: https://github.com/apache/dubbo/pull/16583
## What is the purpose of the change? A Triple HTTP/2 write batch can end on a closed stream. Flushing that final child channel leaves an earlier live sibling's response buffered and its write future pending. Flush through the channel that owns `HttpWriteQueueHandler` at the existing batch boundaries instead. Add an optional batch flush callback to `HttpWriteQueue`, retaining the original constructor's fallback behavior. The handler supplies `ctx.channel()::flush`, which traverses the owning channel's full outbound pipeline, including codecs and flush consolidation. Command execution, ordering, chunk sizes and future propagation remain unchanged. Related: [#11929](https://github.com/apache/dubbo/issues/11929), the closed parent-channel flush proposal. The regression here specifically covers a batch whose final command targets a closed HTTP/2 stream. ## Validation - Before the fix, a paired-codec regression passed with a live final stream and failed with a closed final stream (2 tests, 1 failure, 0 errors). The failure was missing connection outbound response bytes, observed before any extra connection flush or peer pumping. - After the fix, 4 paired-codec cases pass: live/closed final stream, each with/without `FlushConsolidationHandler`. They assert outbound bytes, live write completion, independent final-write success/failure and one connection flush per small batch. - 5 queue tests cover 1, 2, 129, 130 and 259 commands, including scheduling, order, completion and the existing chunk boundaries. - The complete `dubbo-remoting-http12` test suite passes: 40 tests, 0 failures, 0 errors, 2 existing disabled `XmlSafetyTest` cases. Spotless check passes in the same reactor invocation. ```sh mvn -pl dubbo-remoting/dubbo-remoting-http12 -am \ '-Dtest=org/apache/dubbo/remoting/http12/**' \ -Dsurefire.failIfNoSpecifiedTests=false test ``` Dependencies are built in the reactor; no local artifact installation is required. Verification used OpenJDK 25.0.4.1 and Maven 3.9.16. This is an `EmbeddedChannel` transport regression, not a socket-level/full-RPC test or a measurement of production frequency. HTTP/3 and WebSocket integration are not exercised. The full repository test suite has not been run. Fixes #16582 AI assistance was used to develop the change, tests, and this description. -- 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]
