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/04/04 19:20:07 UTC

[GitHub] [rocketmq] rushsky518 opened a new pull request #1916: Specify executor to run CompletionStage

rushsky518 opened a new pull request #1916: Specify executor to run CompletionStage
URL: https://github.com/apache/rocketmq/pull/1916
 
 
   ## What is the purpose of the change
   
   Specify executor to run CompletionStage
   
   ## 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] rushsky518 commented on a change in pull request #1916: [ISSUE #1917]Specify executor to run CompletionStage

Posted by GitBox <gi...@apache.org>.
rushsky518 commented on a change in pull request #1916: [ISSUE #1917]Specify executor to run CompletionStage
URL: https://github.com/apache/rocketmq/pull/1916#discussion_r405351642
 
 

 ##########
 File path: broker/src/main/java/org/apache/rocketmq/broker/processor/SendMessageProcessor.java
 ##########
 @@ -311,9 +311,9 @@ public boolean rejectRequest() {
                                                                             SendMessageContext sendMessageContext,
                                                                             ChannelHandlerContext ctx,
                                                                             int queueIdInt) {
-        return putMessageResult.thenApply((r) ->
-            handlePutMessageResult(r, response, request, msgInner, responseHeader, sendMessageContext, ctx, queueIdInt)
-        );
+        return putMessageResult.thenApplyAsync((r) ->
 
 Review comment:
   i tried to change it, but found that
   `SendMessageProcessor#processRequest` 
   is invoked in 
   `SendMessageProcessorTest#assertPutResult`, 
   that means a returned response is necessary

----------------------------------------------------------------
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 #1916: Specify executor to run CompletionStage

Posted by GitBox <gi...@apache.org>.
rushsky518 commented on issue #1916: Specify executor to run CompletionStage
URL: https://github.com/apache/rocketmq/pull/1916#issuecomment-609077606
 
 
   #1917

----------------------------------------------------------------
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 a change in pull request #1916: [ISSUE #1917]Specify executor to run CompletionStage

Posted by GitBox <gi...@apache.org>.
rushsky518 commented on a change in pull request #1916: [ISSUE #1917]Specify executor to run CompletionStage
URL: https://github.com/apache/rocketmq/pull/1916#discussion_r405280151
 
 

 ##########
 File path: broker/src/main/java/org/apache/rocketmq/broker/processor/SendMessageProcessor.java
 ##########
 @@ -311,9 +311,9 @@ public boolean rejectRequest() {
                                                                             SendMessageContext sendMessageContext,
                                                                             ChannelHandlerContext ctx,
                                                                             int queueIdInt) {
-        return putMessageResult.thenApply((r) ->
-            handlePutMessageResult(r, response, request, msgInner, responseHeader, sendMessageContext, ctx, queueIdInt)
-        );
+        return putMessageResult.thenApplyAsync((r) ->
 
 Review comment:
   i have changed

----------------------------------------------------------------
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] codecov-io commented on issue #1916: [ISSUE #1917]Specify executor to run CompletionStage

Posted by GitBox <gi...@apache.org>.
codecov-io commented on issue #1916: [ISSUE #1917]Specify executor to run CompletionStage
URL: https://github.com/apache/rocketmq/pull/1916#issuecomment-610754960
 
 
   # [Codecov](https://codecov.io/gh/apache/rocketmq/pull/1916?src=pr&el=h1) Report
   > :exclamation: No coverage uploaded for pull request base (`develop@1558e05`). [Click here to learn what that means](https://docs.codecov.io/docs/error-reference#section-missing-base-commit).
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/rocketmq/pull/1916/graphs/tree.svg?width=650&height=150&src=pr&token=4w0sxP1wZv)](https://codecov.io/gh/apache/rocketmq/pull/1916?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##             develop    #1916   +/-   ##
   ==========================================
     Coverage           ?   45.08%           
     Complexity         ?     4195           
   ==========================================
     Files              ?      544           
     Lines              ?    35731           
     Branches           ?     4744           
   ==========================================
     Hits               ?    16109           
     Misses             ?    17575           
     Partials           ?     2047           
   ```
   
   
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/rocketmq/pull/1916?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/rocketmq/pull/1916?src=pr&el=footer). Last update [1558e05...9f9279a](https://codecov.io/gh/apache/rocketmq/pull/1916?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   

----------------------------------------------------------------
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 edited a comment on issue #1916: [ISSUE #1917]Specify executor to run CompletionStage

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on issue #1916: [ISSUE #1917]Specify executor to run CompletionStage
URL: https://github.com/apache/rocketmq/pull/1916#issuecomment-610754921
 
 
   
   [![Coverage Status](https://coveralls.io/builds/29933350/badge)](https://coveralls.io/builds/29933350)
   
   Coverage increased (+0.001%) to 50.869% when pulling **3eda98964ef3d6561f6d9fca3280abab203b14e4 on rushsky518:wrong_thread** into **dd822ae5b7705771655cc6316563182bceb7a244 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

[GitHub] [rocketmq] codecov-io edited a comment on issue #1916: [ISSUE #1917]Specify executor to run CompletionStage

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on issue #1916: [ISSUE #1917]Specify executor to run CompletionStage
URL: https://github.com/apache/rocketmq/pull/1916#issuecomment-610754960
 
 
   # [Codecov](https://codecov.io/gh/apache/rocketmq/pull/1916?src=pr&el=h1) Report
   > Merging [#1916](https://codecov.io/gh/apache/rocketmq/pull/1916?src=pr&el=desc) into [develop](https://codecov.io/gh/apache/rocketmq/commit/dd822ae5b7705771655cc6316563182bceb7a244&el=desc) will **decrease** coverage by `0.02%`.
   > The diff coverage is `75.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/rocketmq/pull/1916/graphs/tree.svg?width=650&height=150&src=pr&token=4w0sxP1wZv)](https://codecov.io/gh/apache/rocketmq/pull/1916?src=pr&el=tree)
   
   ```diff
   @@              Coverage Diff              @@
   ##             develop    #1916      +/-   ##
   =============================================
   - Coverage      45.11%   45.08%   -0.03%     
   + Complexity      4197     4195       -2     
   =============================================
     Files            544      544              
     Lines          35728    35731       +3     
     Branches        4744     4744              
   =============================================
   - Hits           16120    16111       -9     
   - Misses         17563    17572       +9     
   - Partials        2045     2048       +3     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/rocketmq/pull/1916?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
   |---|---|---|---|
   | [...main/java/org/apache/rocketmq/store/CommitLog.java](https://codecov.io/gh/apache/rocketmq/pull/1916/diff?src=pr&el=tree#diff-c3RvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3N0b3JlL0NvbW1pdExvZy5qYXZh) | `67.15% <50.00%> (-0.11%)` | `80.00 <0.00> (ø)` | |
   | [...ocketmq/broker/processor/SendMessageProcessor.java](https://codecov.io/gh/apache/rocketmq/pull/1916/diff?src=pr&el=tree#diff-YnJva2VyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9icm9rZXIvcHJvY2Vzc29yL1NlbmRNZXNzYWdlUHJvY2Vzc29yLmphdmE=) | `41.17% <75.00%> (+0.15%)` | `26.00 <2.00> (ø)` | |
   | [...a/org/apache/rocketmq/broker/BrokerController.java](https://codecov.io/gh/apache/rocketmq/pull/1916/diff?src=pr&el=tree#diff-YnJva2VyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9icm9rZXIvQnJva2VyQ29udHJvbGxlci5qYXZh) | `43.85% <100.00%> (+0.37%)` | `39.00 <1.00> (+2.00)` | |
   | [...rg/apache/rocketmq/common/stats/StatsSnapshot.java](https://codecov.io/gh/apache/rocketmq/pull/1916/diff?src=pr&el=tree#diff-Y29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jb21tb24vc3RhdHMvU3RhdHNTbmFwc2hvdC5qYXZh) | `80.00% <0.00%> (-20.00%)` | `5.00% <0.00%> (-2.00%)` | |
   | [...ache/rocketmq/common/stats/MomentStatsItemSet.java](https://codecov.io/gh/apache/rocketmq/pull/1916/diff?src=pr&el=tree#diff-Y29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jb21tb24vc3RhdHMvTW9tZW50U3RhdHNJdGVtU2V0LmphdmE=) | `56.25% <0.00%> (-12.50%)` | `5.00% <0.00%> (-1.00%)` | |
   | [.../apache/rocketmq/common/stats/MomentStatsItem.java](https://codecov.io/gh/apache/rocketmq/pull/1916/diff?src=pr&el=tree#diff-Y29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jb21tb24vc3RhdHMvTW9tZW50U3RhdHNJdGVtLmphdmE=) | `38.09% <0.00%> (-9.53%)` | `2.00% <0.00%> (-1.00%)` | |
   | [...org/apache/rocketmq/common/stats/StatsItemSet.java](https://codecov.io/gh/apache/rocketmq/pull/1916/diff?src=pr&el=tree#diff-Y29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jb21tb24vc3RhdHMvU3RhdHNJdGVtU2V0LmphdmE=) | `47.52% <0.00%> (-7.93%)` | `12.00% <0.00%> (-2.00%)` | |
   | [...pache/rocketmq/test/listener/AbstractListener.java](https://codecov.io/gh/apache/rocketmq/pull/1916/diff?src=pr&el=tree#diff-dGVzdC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcm9ja2V0bXEvdGVzdC9saXN0ZW5lci9BYnN0cmFjdExpc3RlbmVyLmphdmE=) | `66.66% <0.00%> (-7.41%)` | `9.00% <0.00%> (-1.00%)` | |
   | [...va/org/apache/rocketmq/common/stats/StatsItem.java](https://codecov.io/gh/apache/rocketmq/pull/1916/diff?src=pr&el=tree#diff-Y29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jb21tb24vc3RhdHMvU3RhdHNJdGVtLmphdmE=) | `47.15% <0.00%> (-4.88%)` | `10.00% <0.00%> (-2.00%)` | |
   | [...ava/org/apache/rocketmq/test/util/VerifyUtils.java](https://codecov.io/gh/apache/rocketmq/pull/1916/diff?src=pr&el=tree#diff-dGVzdC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcm9ja2V0bXEvdGVzdC91dGlsL1ZlcmlmeVV0aWxzLmphdmE=) | `46.26% <0.00%> (-2.99%)` | `14.00% <0.00%> (-1.00%)` | |
   | ... and [9 more](https://codecov.io/gh/apache/rocketmq/pull/1916/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/rocketmq/pull/1916?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/rocketmq/pull/1916?src=pr&el=footer). Last update [dd822ae...3eda989](https://codecov.io/gh/apache/rocketmq/pull/1916?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   

----------------------------------------------------------------
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 a change in pull request #1916: [ISSUE #1917]Specify executor to run CompletionStage

Posted by GitBox <gi...@apache.org>.
rushsky518 commented on a change in pull request #1916: [ISSUE #1917]Specify executor to run CompletionStage
URL: https://github.com/apache/rocketmq/pull/1916#discussion_r405280151
 
 

 ##########
 File path: broker/src/main/java/org/apache/rocketmq/broker/processor/SendMessageProcessor.java
 ##########
 @@ -311,9 +311,9 @@ public boolean rejectRequest() {
                                                                             SendMessageContext sendMessageContext,
                                                                             ChannelHandlerContext ctx,
                                                                             int queueIdInt) {
-        return putMessageResult.thenApply((r) ->
-            handlePutMessageResult(r, response, request, msgInner, responseHeader, sendMessageContext, ctx, queueIdInt)
-        );
+        return putMessageResult.thenApplyAsync((r) ->
 
 Review comment:
   i have changed

----------------------------------------------------------------
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 #1916: [ISSUE #1917]Specify executor to run CompletionStage

Posted by GitBox <gi...@apache.org>.
coveralls commented on issue #1916: [ISSUE #1917]Specify executor to run CompletionStage
URL: https://github.com/apache/rocketmq/pull/1916#issuecomment-610754921
 
 
   
   [![Coverage Status](https://coveralls.io/builds/29928856/badge)](https://coveralls.io/builds/29928856)
   
   Coverage decreased (-0.03%) to 50.81% when pulling **9f9279a891939c97a167a81b34f4ef391ab25085 on rushsky518:wrong_thread** into **dc815cc581f9e9dd36efa926fc7087ff1ecbf1a6 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

[GitHub] [rocketmq] duhenglucky commented on a change in pull request #1916: Specify executor to run CompletionStage

Posted by GitBox <gi...@apache.org>.
duhenglucky commented on a change in pull request #1916: Specify executor to run CompletionStage
URL: https://github.com/apache/rocketmq/pull/1916#discussion_r405241171
 
 

 ##########
 File path: broker/src/main/java/org/apache/rocketmq/broker/processor/SendMessageProcessor.java
 ##########
 @@ -311,9 +311,9 @@ public boolean rejectRequest() {
                                                                             SendMessageContext sendMessageContext,
                                                                             ChannelHandlerContext ctx,
                                                                             int queueIdInt) {
-        return putMessageResult.thenApply((r) ->
-            handlePutMessageResult(r, response, request, msgInner, responseHeader, sendMessageContext, ctx, queueIdInt)
-        );
+        return putMessageResult.thenApplyAsync((r) ->
 
 Review comment:
   how about  change to: 
   
           putMessageResult.thenAcceptAsync(result -> {
               RemotingCommand remotingCommand = handlePutMessageResult(result, response, request, msgInner, responseHeader, sendMessageContext, ctx, queueIdInt);
               if (remotingCommand != null) {
                   doResponse(ctx, request, remotingCommand);
               }
   
           }, this.brokerController.getSendMessageExecutor());
   
           return null;

----------------------------------------------------------------
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