New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ISSUE #1879] Prevent blocked by group transfer service #1881
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Run example org.apache.rocketmq.example.quickstart.Producer
to send a msg.
for debug, i add a sout here
@Override
public void asyncProcessRequest(ChannelHandlerContext ctx, RemotingCommand request, RemotingResponseCallback responseCallback) throws Exception {
asyncProcessRequest(ctx, request).thenAcceptAsync(
r -> {
System.out.println(r);
responseCallback.callback(r);
},
this.brokerController.getSendMessageExecutor());
}
debug result:
org.apache.rocketmq.broker.processor.SendMessageProcessor#handlePutMessageResult
is invoked in GroupCommitService thread.
{
System.out.println(r);
responseCallback.callback(r);
}
is invoked in SendMessageThread_1, and r is null
r is null just because of the succeed send message response returned to the client directly by org.apache.rocketmq.broker.processor.AbstractSendMessageProcessor#doResponse in org.apache.rocketmq.broker.processor.SendMessageProcessor#handlePutMessageResult method and these responses will not be processed by AfterRPCHook, the code here is a little confusing |
Yes, that's why i apply |
yep, actually ctx.writeAndFlush is also a blocking operation, let us polish it in your PR. |
[ISSUE apache#1879] Prevent blocked by group transfer service
[ISSUE apache#1879] Prevent blocked by group transfer service
What is the purpose of the change
close issue
Brief changelog
XX
Verifying this change
XXXX
Follow this checklist to help us incorporate your contribution quickly and easily. Notice,
it would be helpful if you could finish the following 5 checklist(the last one is not necessary)before request the community to review your PR
.[ISSUE #123] Fix UnknownException when host config not exist
. Each commit in the pull request should have a meaningful subject line and body.mvn -B clean apache-rat:check findbugs:findbugs checkstyle:checkstyle
to make sure basic checks pass. Runmvn clean install -DskipITs
to make sure unit-test pass. Runmvn clean test-compile failsafe:integration-test
to make sure integration-test pass.