qianye1001 opened a new pull request, #11152: URL: https://github.com/apache/rocketmq/pull/11152
### Which Issue(s) This PR Fixes Fixes #11151. ### Brief Description A sub-server now honors the existing graceful-shutdown configuration: it enters the draining state, keeps its listener open for its own grace period, and then closes that listener. Requests continue to use the existing `GO_AWAY` handling and client-version condition. Other ports and shared executors remain available when a child shuts down independently. Parent shutdown starts draining all children before waiting. Each server records its own deadline on its first transition to draining; an already draining child retains its original deadline. The parent waits for the latest deadline before closing child listeners and releasing shared resources, so the grace periods overlap instead of accumulating sequentially. Concurrent or repeated shutdown calls wait for the first call's completion without shortening or restarting its grace period. A short `ReentrantLock` coordinates state transitions only; waiting and channel closure happen outside the lock, with no additional executor or timer thread. ### How Did You Test This Change? - JDK 11: 14 focused remoting server/config/lifecycle tests passed, with Checkstyle and SpotBugs enabled. - The new real-TCP tests cover existing and fresh connections during draining, independent child shutdown and unaffected sibling/parent ports, parent-only shutdown of multiple children, both parent/child shutdown orders, simultaneous and repeated calls, a pre-existing child deadline longer than the parent's wait, disabled graceful shutdown, older client versions, and interruption. - On the unmodified base, the parent-shutdown regression test fails because children never enter the draining state. -- 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]
