123123213weqw opened a new pull request, #10915: URL: https://github.com/apache/rocketmq/pull/10915
## What is the purpose of the change Fix #10898. NettyEventExecutor blocks in eventQueue.poll(3000, MILLISECONDS), but ServiceThread.shutdown() only signals the stopped flag and calls wakeup(), which unparks a parked thread and cannot release a thread blocked on a LinkedBlockingQueue. Every shutdown of a remoting instance therefore waited up to 3 seconds per NettyEventExecutor. ## Brief changelog - NettyRemotingAbstract.NettyEventExecutor now overrides shutdown(boolean): it offers a sentinel event (null type) into the queue so the blocked poll returns immediately, then delegates to the superclass shutdown - the run loop skips events with a null type, so the sentinel is consumed without touching the channel listener ## How was this patch verified - Code review of the poll loop: the sentinel event makes poll return at once, the loop re-checks isStopped() and exits promptly - `git diff --check` clean -- 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]
