chaoyoung commented on PR #16418: URL: https://github.com/apache/dubbo/pull/16418#issuecomment-6969983771
Static review of `b4f582a43c` The new guard releases the response buffer when the callback executor is already shut down. `testOnDataReleaseByteBufAfterCallbackExecutorShutdown` covers that case by shutting down the executor before calling `onData` and checking that the buffer is released. [Guard](https://github.com/apache/dubbo/blob/b4f582a43c88f39372b25b967bb767d85db84cd5/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/stream/AbstractTripleClientStream.java#L564-L579) · [Test](https://github.com/apache/dubbo/blob/b4f582a43c88f39372b25b967bb767d85db84cd5/dubbo-rpc/dubbo-rpc-triple/src/test/java/org/apache/dubbo/rpc/protocol/tri/stream/TripleClientStreamTest.java#L135-L171) There is still a potential ownership gap if shutdown overlaps submission. The guard in `onData` and task acceptance are separate. On shutdown, `SerializingExecutor` can discard the submitted task and return normally, so neither the task nor the caller's exception cleanup runs. The HTTP/2 response handler has delegated ownership of the buffer at that point. [Submission and cleanup](https://github.com/apache/dubbo/blob/b4f582a43c88f39372b25b967bb767d85db84cd5/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/stream/AbstractTripleClientStream.java#L568-L605) · [Executor behavior](https://github.com/apache/dubbo/blob/b4f582a43c88f39372b25b967bb767d85db84cd5/dubbo-common/src/main/java/org/apache/dubbo/common/threadpool/serial/SerializingExecutor.java#L64-L101) · [Response handler](https://github.com/apache/dubbo/blob/b4f582a43c88f39372b25b967bb767d85db84cd5/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/transport/TripleHttp2ClientR esponseHandler.java#L40-L65) Could we add a regression for shutdown during submission, with an accepted-task control? The expected behavior is to release discarded input exactly once and preserve normal delivery of input the executor has accepted. This finding is based on AI-assisted source inspection of the named commit. Runtime confirmation of the concurrent case is still pending. -- 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]
