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 2020/03/24 04:16:42 UTC

[GitHub] [rocketmq] duhenglucky opened a new pull request #1881: Prevent blocked by group transfer service

duhenglucky opened a new pull request #1881: Prevent blocked by group transfer service
URL: https://github.com/apache/rocketmq/pull/1881
 
 
   ## What is the purpose of the change
   
   close [issue](https://github.com/apache/rocketmq/issues/1879)
   
   ## 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`.
   
   - [x] Make sure there is a [Github issue](https://github.com/apache/rocketmq/issues) filed for the change (usually before you start working on it). Trivial changes like typos do not require a Github issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue. 
   - [x] Format the pull request title like `[ISSUE #123] Fix UnknownException when host config not exist`. Each commit in the pull request should have a meaningful subject line and body.
   - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
   - [x] Write necessary unit-test(over 80% coverage) to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add integration-test in [test module](https://github.com/apache/rocketmq/tree/master/test).
   - [x] Run `mvn -B clean apache-rat:check findbugs:findbugs checkstyle:checkstyle` to make sure basic checks pass. Run `mvn clean install -DskipITs` to make sure unit-test pass. Run `mvn clean test-compile failsafe:integration-test`  to make sure integration-test pass.
   - [ ] If this contribution is large, please file an [Apache Individual Contributor License Agreement](http://www.apache.org/licenses/#clas).
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [rocketmq] duhenglucky commented on issue #1881: [ISSUE #1879] Prevent blocked by group transfer service

Posted by GitBox <gi...@apache.org>.
duhenglucky commented on issue #1881: [ISSUE #1879] Prevent blocked by group transfer service
URL: https://github.com/apache/rocketmq/pull/1881#issuecomment-610735743
 
 
   > > > Run example `org.apache.rocketmq.example.quickstart.Producer` to send a msg.
   > > > for debug, i add a sout here
   > > > ```java
   > > > @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:
   > > > 
   > > > 1. `org.apache.rocketmq.broker.processor.SendMessageProcessor#handlePutMessageResult` is invoked in GroupCommitService thread.
   > > > 
   > > > ```java
   > > > {
   > > >   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 `thenApplyAsync` method on `SendMessageProcessor#handlePutMessageResult`, it returns the real response
   
   yep, actually ctx.writeAndFlush is also a blocking operation, let us polish it in your PR.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [rocketmq] duhenglucky commented on issue #1881: [ISSUE #1879] Prevent blocked by group transfer service

Posted by GitBox <gi...@apache.org>.
duhenglucky commented on issue #1881: [ISSUE #1879] Prevent blocked by group transfer service
URL: https://github.com/apache/rocketmq/pull/1881#issuecomment-610727791
 
 
   > Run example `org.apache.rocketmq.example.quickstart.Producer` to send a msg.
   > 
   > for debug, i add a sout here
   > 
   > ```java
   > @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:
   > 
   > 1. `org.apache.rocketmq.broker.processor.SendMessageProcessor#handlePutMessageResult` is invoked in GroupCommitService thread.
   > 
   > ```java
   > {
   >   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

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [rocketmq] duhenglucky merged pull request #1881: [ISSUE #1879] Prevent blocked by group transfer service

Posted by GitBox <gi...@apache.org>.
duhenglucky merged pull request #1881: [ISSUE #1879] Prevent blocked by group transfer service
URL: https://github.com/apache/rocketmq/pull/1881
 
 
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [rocketmq] rushsky518 commented on issue #1881: [ISSUE #1879] Prevent blocked by group transfer service

Posted by GitBox <gi...@apache.org>.
rushsky518 commented on issue #1881: [ISSUE #1879] Prevent blocked by group transfer service
URL: https://github.com/apache/rocketmq/pull/1881#issuecomment-610732596
 
 
   > > Run example `org.apache.rocketmq.example.quickstart.Producer` to send a msg.
   > > for debug, i add a sout here
   > > ```java
   > > @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:
   > > 
   > > 1. `org.apache.rocketmq.broker.processor.SendMessageProcessor#handlePutMessageResult` is invoked in GroupCommitService thread.
   > > 
   > > ```java
   > > {
   > >   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 `thenApplyAsync` method on `SendMessageProcessor#handlePutMessageResult`, it returns the real response

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [rocketmq] coveralls commented on issue #1881: Prevent blocked by group transfer service

Posted by GitBox <gi...@apache.org>.
coveralls commented on issue #1881: Prevent blocked by group transfer service
URL: https://github.com/apache/rocketmq/pull/1881#issuecomment-603011189
 
 
   
   [![Coverage Status](https://coveralls.io/builds/29569901/badge)](https://coveralls.io/builds/29569901)
   
   Coverage decreased (-0.01%) to 50.933% when pulling **14969aa389f1c87d362504a3899c19ed37a3ee51 on duhenglucky:issue_1879** into **1558e052018ae12d273e175dd3c6ba004e9e0995 on apache:develop**.
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services