qianye1001 opened a new pull request, #11092:
URL: https://github.com/apache/rocketmq/pull/11092

   ### Which Issue(s) This PR Fixes
   
   Fixes #11091
   
   ### Brief Description
   
   Server-initiated async requests through a `SubRemotingServer` can remain 
pending indefinitely after a successful write if no response arrives: the 
shared housekeeping timer scans only the parent response table. Scan every 
registered remoting server with the existing timer so expired requests trigger 
timeout callbacks and release their response-table entries and async permits.
   
   Also shut down the remoting-code distribution scheduler when the parent 
server shuts down, preventing its periodic task and `NettyServerScheduler` 
thread from surviving server shutdown. No additional threads are introduced.
   
   ### How Did You Test This Change?
   
   - Confirmed both regressions on unmodified `develop`: the sub-server timeout 
callback never completed, and the scheduler remained running after shutdown.
   - Added lifecycle tests using the real housekeeping timer and simulated 
successful channel writes without responses. They cover the parent and two sub 
servers, timeout callbacks, response-table cleanup, async permit release, 
preservation of unexpired requests, and scheduler termination.
   - JDK 11: `mvn -pl remoting -am 
-Dtest=NettyRemotingServerLifecycleTest,NettyRemotingServerTest,SubRemotingServerTest,RemotingServerTest,NettyRemotingAbstractTest
 -Dsurefire.failIfNoSpecifiedTests=false test`, including Checkstyle and 
SpotBugs.
   


-- 
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]

Reply via email to