You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2021/12/11 16:12:34 UTC
[GitHub] [rocketmq] areyouok commented on a change in pull request #3631: [ISSUE #3630] Fix the bug that the broker will hang after polish the headWaitTimeMills method
areyouok commented on a change in pull request #3631:
URL: https://github.com/apache/rocketmq/pull/3631#discussion_r767168855
##########
File path: broker/src/main/java/org/apache/rocketmq/broker/processor/SendMessageProcessor.java
##########
@@ -84,7 +84,7 @@ public RemotingCommand processRequest(ChannelHandlerContext ctx,
@Override
public void asyncProcessRequest(ChannelHandlerContext ctx, RemotingCommand request, RemotingResponseCallback responseCallback) throws Exception {
- asyncProcessRequest(ctx, request).thenAcceptAsync(responseCallback::callback, this.brokerController.getSendMessageExecutor());
+ asyncProcessRequest(ctx, request).thenAcceptAsync(responseCallback::callback, this.brokerController.getPutMessageFutureExecutor());
Review comment:
The callback is an async netty operation (ctx.writeAndFlush). I suggest use thenAccept() method, the writeAndFlush may run in these threads:
1. sendMessageExecutor
2. the flush thread
3. the transfer thread
Or use a single thread executor.
--
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: dev-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org