qianye1001 opened a new pull request, #11084: URL: https://github.com/apache/rocketmq/pull/11084
### Which Issue(s) This PR Fixes Fixes #11083 ### Brief Description `GrpcServerBuilder` supplies explicitly created boss and worker event loop groups to gRPC, but `GrpcServer.shutdown()` never releases them. gRPC treats these groups as caller-owned, so their threads remain alive after the server shuts down. Track internally created groups and shut them down when the server stops, including startup failure, shutdown timeout, and interruption. Create owned groups during `build()` and release them if building fails. Preserve existing constructor defaults and add overloads for explicit thread counts or caller-owned groups; supplied groups remain the caller's responsibility and can outlive an individual server. ### How Did You Test This Change? ```sh mvn -B -pl proxy -am -Dtest=GrpcServerTest -Dsurefire.failIfNoSpecifiedTests=false test ``` On JDK 11: six tests passed and one Epoll test was skipped because the local platform is macOS. Checkstyle and SpotBugs passed. Coverage includes actual gRPC requests, termination of default and explicitly sized owned groups, cleanup after a bind failure, continued service on shared caller-owned groups after another server stops or fails to bind, and cleanup on shutdown timeout or interruption. The Epoll test runs the same owned-group lifecycle checks where Epoll is available. -- 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]
