RockteMQ-AI commented on issue #11151:
URL: https://github.com/apache/rocketmq/issues/11151#issuecomment-5631410642

   **Issue Evaluation**
   
   Category: `bug` | Status: **Confirmed**
   
   The reported issue has been verified against the current codebase (commit 
`d38f81e787`).
   
   **Root Cause:**
   `SubRemotingServer.shutdown()` (line 762-770 in `NettyRemotingServer.java`) 
immediately closes its listening channel with only a 5-second await, without 
honoring the parent's `enableShutdownGracefully` or `shutdownWaitTimeSeconds` 
configuration. The parent's `shutdown()` method properly checks these settings 
and sleeps for the configured grace period before releasing resources.
   
   Additionally:
   - Sub-servers use `isShuttingDown.set(true)` instead of CAS, so concurrent 
shutdown calls aren't coordinated
   - The parent's `shutdown()` only marks itself as shutting down, leaving 
sub-servers to continue processing until shared event loops shut down
   - No GO_AWAY response handling in sub-servers during the grace period
   
   **Impact:** Clients connecting to sub-server ports during graceful shutdown 
will experience connection failures instead of receiving proper GO_AWAY 
responses, breaking the graceful shutdown contract.
   
   **Severity:** Medium - affects production deployments using graceful 
shutdown with multiple ports
   
   **Affected Files:**
   - 
`remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingServer.java`
 (SubRemotingServer inner class)
   
   An automated fix proposal will be generated. Reply `/approve` to proceed 
with PR generation.
   
   ---
   *Automated evaluation by RockteMQ-AI*
   


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