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 2022/03/08 08:10:56 UTC

[GitHub] [rocketmq] zhangjidi2016 opened a new pull request #3941: [ISSUE #3940]Optimize AllocateMessageQueueStrategy

zhangjidi2016 opened a new pull request #3941:
URL: https://github.com/apache/rocketmq/pull/3941


   **Make sure set the target branch to `develop`**
   
   ## What is the purpose of the change
   
   #3940
   
   ## 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.

To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq] Git-Yang commented on a change in pull request #3941: [ISSUE #3940]Optimize AllocateMessageQueueStrategy

Posted by GitBox <gi...@apache.org>.
Git-Yang commented on a change in pull request #3941:
URL: https://github.com/apache/rocketmq/pull/3941#discussion_r825907023



##########
File path: client/src/main/java/org/apache/rocketmq/client/consumer/rebalance/AllocateMessageQueueByConfig.java
##########
@@ -16,16 +16,20 @@
  */
 package org.apache.rocketmq.client.consumer.rebalance;
 
+import java.util.ArrayList;
 import java.util.List;
-import org.apache.rocketmq.client.consumer.AllocateMessageQueueStrategy;
 import org.apache.rocketmq.common.message.MessageQueue;
 
-public class AllocateMessageQueueByConfig implements AllocateMessageQueueStrategy {
+public class AllocateMessageQueueByConfig extends AbstractAllocateMessageQueueStrategy {
     private List<MessageQueue> messageQueueList;
 
     @Override
     public List<MessageQueue> allocate(String consumerGroup, String currentCID, List<MessageQueue> mqAll,
         List<String> cidAll) {
+        List<MessageQueue> result = new ArrayList<MessageQueue>();
+        if (!check(consumerGroup, currentCID, mqAll, cidAll)) {

Review comment:
       There seems to be no need for verification here.




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



[GitHub] [rocketmq] codecov-commenter edited a comment on pull request #3941: [ISSUE #3940]Optimize AllocateMessageQueueStrategy

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #3941:
URL: https://github.com/apache/rocketmq/pull/3941#issuecomment-1061586764


   # [Codecov](https://codecov.io/gh/apache/rocketmq/pull/3941?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#3941](https://codecov.io/gh/apache/rocketmq/pull/3941?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (a7fe863) into [develop](https://codecov.io/gh/apache/rocketmq/commit/7a5d937c76c2b99e65a18388f9c3acb3d80afd16?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (7a5d937) will **increase** coverage by `0.16%`.
   > The diff coverage is `76.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/rocketmq/pull/3941/graphs/tree.svg?width=650&height=150&src=pr&token=4w0sxP1wZv&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/rocketmq/pull/3941?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@              Coverage Diff              @@
   ##             develop    #3941      +/-   ##
   =============================================
   + Coverage      47.64%   47.80%   +0.16%     
   - Complexity      4957     4984      +27     
   =============================================
     Files            633      634       +1     
     Lines          42577    42556      -21     
     Branches        5589     5584       -5     
   =============================================
   + Hits           20285    20345      +60     
   + Misses         19786    19715      -71     
   + Partials        2506     2496      -10     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/rocketmq/pull/3941?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [.../consumer/rebalance/AllocateMachineRoomNearby.java](https://codecov.io/gh/apache/rocketmq/pull/3941/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvY29uc3VtZXIvcmViYWxhbmNlL0FsbG9jYXRlTWFjaGluZVJvb21OZWFyYnkuamF2YQ==) | `70.73% <0.00%> (+9.50%)` | :arrow_up: |
   | [...r/rebalance/AllocateMessageQueueByMachineRoom.java](https://codecov.io/gh/apache/rocketmq/pull/3941/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvY29uc3VtZXIvcmViYWxhbmNlL0FsbG9jYXRlTWVzc2FnZVF1ZXVlQnlNYWNoaW5lUm9vbS5qYXZh) | `73.07% <33.33%> (+73.07%)` | :arrow_up: |
   | [...sumer/rebalance/AllocateMessageQueueAveragely.java](https://codecov.io/gh/apache/rocketmq/pull/3941/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvY29uc3VtZXIvcmViYWxhbmNlL0FsbG9jYXRlTWVzc2FnZVF1ZXVlQXZlcmFnZWx5LmphdmE=) | `86.66% <50.00%> (+25.79%)` | :arrow_up: |
   | [...nsumer/rebalance/AllocateMessageQueueByConfig.java](https://codecov.io/gh/apache/rocketmq/pull/3941/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvY29uc3VtZXIvcmViYWxhbmNlL0FsbG9jYXRlTWVzc2FnZVF1ZXVlQnlDb25maWcuamF2YQ==) | `55.55% <50.00%> (+55.55%)` | :arrow_up: |
   | [...ebalance/AbstractAllocateMessageQueueStrategy.java](https://codecov.io/gh/apache/rocketmq/pull/3941/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvY29uc3VtZXIvcmViYWxhbmNlL0Fic3RyYWN0QWxsb2NhdGVNZXNzYWdlUXVldWVTdHJhdGVneS5qYXZh) | `100.00% <100.00%> (ø)` | |
   | [...balance/AllocateMessageQueueAveragelyByCircle.java](https://codecov.io/gh/apache/rocketmq/pull/3941/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvY29uc3VtZXIvcmViYWxhbmNlL0FsbG9jYXRlTWVzc2FnZVF1ZXVlQXZlcmFnZWx5QnlDaXJjbGUuamF2YQ==) | `90.00% <100.00%> (+28.88%)` | :arrow_up: |
   | [.../rebalance/AllocateMessageQueueConsistentHash.java](https://codecov.io/gh/apache/rocketmq/pull/3941/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvY29uc3VtZXIvcmViYWxhbmNlL0FsbG9jYXRlTWVzc2FnZVF1ZXVlQ29uc2lzdGVudEhhc2guamF2YQ==) | `81.25% <100.00%> (+3.75%)` | :arrow_up: |
   | [...org/apache/rocketmq/store/ha/WaitNotifyObject.java](https://codecov.io/gh/apache/rocketmq/pull/3941/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3RvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3N0b3JlL2hhL1dhaXROb3RpZnlPYmplY3QuamF2YQ==) | `66.07% <0.00%> (-5.36%)` | :arrow_down: |
   | [...ketmq/common/protocol/body/ConsumerConnection.java](https://codecov.io/gh/apache/rocketmq/pull/3941/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jb21tb24vcHJvdG9jb2wvYm9keS9Db25zdW1lckNvbm5lY3Rpb24uamF2YQ==) | `95.83% <0.00%> (-4.17%)` | :arrow_down: |
   | [...a/org/apache/rocketmq/filter/util/BloomFilter.java](https://codecov.io/gh/apache/rocketmq/pull/3941/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZmlsdGVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9maWx0ZXIvdXRpbC9CbG9vbUZpbHRlci5qYXZh) | `59.13% <0.00%> (-2.16%)` | :arrow_down: |
   | ... and [15 more](https://codecov.io/gh/apache/rocketmq/pull/3941/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/rocketmq/pull/3941?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/rocketmq/pull/3941?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [7a5d937...a7fe863](https://codecov.io/gh/apache/rocketmq/pull/3941?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


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



[GitHub] [rocketmq] codecov-commenter commented on pull request #3941: [ISSUE #3940]Optimize AllocateMessageQueueStrategy

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #3941:
URL: https://github.com/apache/rocketmq/pull/3941#issuecomment-1061586764


   # [Codecov](https://codecov.io/gh/apache/rocketmq/pull/3941?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#3941](https://codecov.io/gh/apache/rocketmq/pull/3941?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (a7fe863) into [develop](https://codecov.io/gh/apache/rocketmq/commit/7a5d937c76c2b99e65a18388f9c3acb3d80afd16?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (7a5d937) will **increase** coverage by `0.03%`.
   > The diff coverage is `76.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/rocketmq/pull/3941/graphs/tree.svg?width=650&height=150&src=pr&token=4w0sxP1wZv&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/rocketmq/pull/3941?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@              Coverage Diff              @@
   ##             develop    #3941      +/-   ##
   =============================================
   + Coverage      47.64%   47.67%   +0.03%     
   - Complexity      4957     4961       +4     
   =============================================
     Files            633      634       +1     
     Lines          42577    42556      -21     
     Branches        5589     5584       -5     
   =============================================
   + Hits           20285    20288       +3     
   + Misses         19786    19762      -24     
     Partials        2506     2506              
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/rocketmq/pull/3941?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [.../consumer/rebalance/AllocateMachineRoomNearby.java](https://codecov.io/gh/apache/rocketmq/pull/3941/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvY29uc3VtZXIvcmViYWxhbmNlL0FsbG9jYXRlTWFjaGluZVJvb21OZWFyYnkuamF2YQ==) | `70.73% <0.00%> (+9.50%)` | :arrow_up: |
   | [...r/rebalance/AllocateMessageQueueByMachineRoom.java](https://codecov.io/gh/apache/rocketmq/pull/3941/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvY29uc3VtZXIvcmViYWxhbmNlL0FsbG9jYXRlTWVzc2FnZVF1ZXVlQnlNYWNoaW5lUm9vbS5qYXZh) | `73.07% <33.33%> (+73.07%)` | :arrow_up: |
   | [...sumer/rebalance/AllocateMessageQueueAveragely.java](https://codecov.io/gh/apache/rocketmq/pull/3941/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvY29uc3VtZXIvcmViYWxhbmNlL0FsbG9jYXRlTWVzc2FnZVF1ZXVlQXZlcmFnZWx5LmphdmE=) | `86.66% <50.00%> (+25.79%)` | :arrow_up: |
   | [...nsumer/rebalance/AllocateMessageQueueByConfig.java](https://codecov.io/gh/apache/rocketmq/pull/3941/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvY29uc3VtZXIvcmViYWxhbmNlL0FsbG9jYXRlTWVzc2FnZVF1ZXVlQnlDb25maWcuamF2YQ==) | `55.55% <50.00%> (+55.55%)` | :arrow_up: |
   | [...ebalance/AbstractAllocateMessageQueueStrategy.java](https://codecov.io/gh/apache/rocketmq/pull/3941/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvY29uc3VtZXIvcmViYWxhbmNlL0Fic3RyYWN0QWxsb2NhdGVNZXNzYWdlUXVldWVTdHJhdGVneS5qYXZh) | `100.00% <100.00%> (ø)` | |
   | [...balance/AllocateMessageQueueAveragelyByCircle.java](https://codecov.io/gh/apache/rocketmq/pull/3941/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvY29uc3VtZXIvcmViYWxhbmNlL0FsbG9jYXRlTWVzc2FnZVF1ZXVlQXZlcmFnZWx5QnlDaXJjbGUuamF2YQ==) | `90.00% <100.00%> (+28.88%)` | :arrow_up: |
   | [.../rebalance/AllocateMessageQueueConsistentHash.java](https://codecov.io/gh/apache/rocketmq/pull/3941/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvY29uc3VtZXIvcmViYWxhbmNlL0FsbG9jYXRlTWVzc2FnZVF1ZXVlQ29uc2lzdGVudEhhc2guamF2YQ==) | `81.25% <100.00%> (+3.75%)` | :arrow_up: |
   | [...va/org/apache/rocketmq/store/FlushDiskWatcher.java](https://codecov.io/gh/apache/rocketmq/pull/3941/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3RvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3N0b3JlL0ZsdXNoRGlza1dhdGNoZXIuamF2YQ==) | `81.25% <0.00%> (-9.38%)` | :arrow_down: |
   | [...org/apache/rocketmq/store/ha/WaitNotifyObject.java](https://codecov.io/gh/apache/rocketmq/pull/3941/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3RvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3N0b3JlL2hhL1dhaXROb3RpZnlPYmplY3QuamF2YQ==) | `66.07% <0.00%> (-5.36%)` | :arrow_down: |
   | [...apache/rocketmq/remoting/netty/ResponseFuture.java](https://codecov.io/gh/apache/rocketmq/pull/3941/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cmVtb3Rpbmcvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3JlbW90aW5nL25ldHR5L1Jlc3BvbnNlRnV0dXJlLmphdmE=) | `85.00% <0.00%> (-5.00%)` | :arrow_down: |
   | ... and [28 more](https://codecov.io/gh/apache/rocketmq/pull/3941/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/rocketmq/pull/3941?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/rocketmq/pull/3941?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [7a5d937...a7fe863](https://codecov.io/gh/apache/rocketmq/pull/3941?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


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



[GitHub] [rocketmq] zhangjidi2016 commented on a change in pull request #3941: [ISSUE #3940]Optimize AllocateMessageQueueStrategy

Posted by GitBox <gi...@apache.org>.
zhangjidi2016 commented on a change in pull request #3941:
URL: https://github.com/apache/rocketmq/pull/3941#discussion_r827078392



##########
File path: client/src/main/java/org/apache/rocketmq/client/consumer/rebalance/AllocateMessageQueueByConfig.java
##########
@@ -16,16 +16,20 @@
  */
 package org.apache.rocketmq.client.consumer.rebalance;
 
+import java.util.ArrayList;
 import java.util.List;
-import org.apache.rocketmq.client.consumer.AllocateMessageQueueStrategy;
 import org.apache.rocketmq.common.message.MessageQueue;
 
-public class AllocateMessageQueueByConfig implements AllocateMessageQueueStrategy {
+public class AllocateMessageQueueByConfig extends AbstractAllocateMessageQueueStrategy {
     private List<MessageQueue> messageQueueList;
 
     @Override
     public List<MessageQueue> allocate(String consumerGroup, String currentCID, List<MessageQueue> mqAll,
         List<String> cidAll) {
+        List<MessageQueue> result = new ArrayList<MessageQueue>();
+        if (!check(consumerGroup, currentCID, mqAll, cidAll)) {

Review comment:
       Yes,I will remove the check




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



[GitHub] [rocketmq] coveralls edited a comment on pull request #3941: [ISSUE #3940]Optimize AllocateMessageQueueStrategy

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #3941:
URL: https://github.com/apache/rocketmq/pull/3941#issuecomment-1061586430


   
   [![Coverage Status](https://coveralls.io/builds/47389446/badge)](https://coveralls.io/builds/47389446)
   
   Coverage increased (+0.3%) to 51.938% when pulling **9b56895cd17caf73a534034dd626ef4f3797b307 on zhangjidi2016:optimize_code** into **7a5d937c76c2b99e65a18388f9c3acb3d80afd16 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.

To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq] coveralls commented on pull request #3941: [ISSUE #3940]Optimize AllocateMessageQueueStrategy

Posted by GitBox <gi...@apache.org>.
coveralls commented on pull request #3941:
URL: https://github.com/apache/rocketmq/pull/3941#issuecomment-1061586430


   
   [![Coverage Status](https://coveralls.io/builds/47158976/badge)](https://coveralls.io/builds/47158976)
   
   Coverage increased (+0.07%) to 51.704% when pulling **a7fe863e6958e93aef04e69eba6f6cc0e008059f on zhangjidi2016:optimize_code** into **7a5d937c76c2b99e65a18388f9c3acb3d80afd16 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.

To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq] codecov-commenter edited a comment on pull request #3941: [ISSUE #3940]Optimize AllocateMessageQueueStrategy

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #3941:
URL: https://github.com/apache/rocketmq/pull/3941#issuecomment-1061586764


   # [Codecov](https://codecov.io/gh/apache/rocketmq/pull/3941?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#3941](https://codecov.io/gh/apache/rocketmq/pull/3941?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (a7fe863) into [develop](https://codecov.io/gh/apache/rocketmq/commit/7a5d937c76c2b99e65a18388f9c3acb3d80afd16?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (7a5d937) will **increase** coverage by `0.07%`.
   > The diff coverage is `76.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/rocketmq/pull/3941/graphs/tree.svg?width=650&height=150&src=pr&token=4w0sxP1wZv&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/rocketmq/pull/3941?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@              Coverage Diff              @@
   ##             develop    #3941      +/-   ##
   =============================================
   + Coverage      47.64%   47.71%   +0.07%     
   - Complexity      4957     4967      +10     
   =============================================
     Files            633      634       +1     
     Lines          42577    42556      -21     
     Branches        5589     5584       -5     
   =============================================
   + Hits           20285    20306      +21     
   + Misses         19786    19749      -37     
   + Partials        2506     2501       -5     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/rocketmq/pull/3941?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [.../consumer/rebalance/AllocateMachineRoomNearby.java](https://codecov.io/gh/apache/rocketmq/pull/3941/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvY29uc3VtZXIvcmViYWxhbmNlL0FsbG9jYXRlTWFjaGluZVJvb21OZWFyYnkuamF2YQ==) | `70.73% <0.00%> (+9.50%)` | :arrow_up: |
   | [...r/rebalance/AllocateMessageQueueByMachineRoom.java](https://codecov.io/gh/apache/rocketmq/pull/3941/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvY29uc3VtZXIvcmViYWxhbmNlL0FsbG9jYXRlTWVzc2FnZVF1ZXVlQnlNYWNoaW5lUm9vbS5qYXZh) | `73.07% <33.33%> (+73.07%)` | :arrow_up: |
   | [...sumer/rebalance/AllocateMessageQueueAveragely.java](https://codecov.io/gh/apache/rocketmq/pull/3941/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvY29uc3VtZXIvcmViYWxhbmNlL0FsbG9jYXRlTWVzc2FnZVF1ZXVlQXZlcmFnZWx5LmphdmE=) | `86.66% <50.00%> (+25.79%)` | :arrow_up: |
   | [...nsumer/rebalance/AllocateMessageQueueByConfig.java](https://codecov.io/gh/apache/rocketmq/pull/3941/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvY29uc3VtZXIvcmViYWxhbmNlL0FsbG9jYXRlTWVzc2FnZVF1ZXVlQnlDb25maWcuamF2YQ==) | `55.55% <50.00%> (+55.55%)` | :arrow_up: |
   | [...ebalance/AbstractAllocateMessageQueueStrategy.java](https://codecov.io/gh/apache/rocketmq/pull/3941/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvY29uc3VtZXIvcmViYWxhbmNlL0Fic3RyYWN0QWxsb2NhdGVNZXNzYWdlUXVldWVTdHJhdGVneS5qYXZh) | `100.00% <100.00%> (ø)` | |
   | [...balance/AllocateMessageQueueAveragelyByCircle.java](https://codecov.io/gh/apache/rocketmq/pull/3941/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvY29uc3VtZXIvcmViYWxhbmNlL0FsbG9jYXRlTWVzc2FnZVF1ZXVlQXZlcmFnZWx5QnlDaXJjbGUuamF2YQ==) | `90.00% <100.00%> (+28.88%)` | :arrow_up: |
   | [.../rebalance/AllocateMessageQueueConsistentHash.java](https://codecov.io/gh/apache/rocketmq/pull/3941/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvY29uc3VtZXIvcmViYWxhbmNlL0FsbG9jYXRlTWVzc2FnZVF1ZXVlQ29uc2lzdGVudEhhc2guamF2YQ==) | `81.25% <100.00%> (+3.75%)` | :arrow_up: |
   | [...org/apache/rocketmq/store/ha/WaitNotifyObject.java](https://codecov.io/gh/apache/rocketmq/pull/3941/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3RvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3N0b3JlL2hhL1dhaXROb3RpZnlPYmplY3QuamF2YQ==) | `66.07% <0.00%> (-5.36%)` | :arrow_down: |
   | [...apache/rocketmq/remoting/netty/ResponseFuture.java](https://codecov.io/gh/apache/rocketmq/pull/3941/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cmVtb3Rpbmcvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3JlbW90aW5nL25ldHR5L1Jlc3BvbnNlRnV0dXJlLmphdmE=) | `85.00% <0.00%> (-5.00%)` | :arrow_down: |
   | [...ache/rocketmq/common/stats/MomentStatsItemSet.java](https://codecov.io/gh/apache/rocketmq/pull/3941/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jb21tb24vc3RhdHMvTW9tZW50U3RhdHNJdGVtU2V0LmphdmE=) | `47.82% <0.00%> (-4.35%)` | :arrow_down: |
   | ... and [24 more](https://codecov.io/gh/apache/rocketmq/pull/3941/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/rocketmq/pull/3941?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/rocketmq/pull/3941?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [7a5d937...a7fe863](https://codecov.io/gh/apache/rocketmq/pull/3941?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


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



[GitHub] [rocketmq] coveralls edited a comment on pull request #3941: [ISSUE #3940]Optimize AllocateMessageQueueStrategy

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #3941:
URL: https://github.com/apache/rocketmq/pull/3941#issuecomment-1061586430


   
   [![Coverage Status](https://coveralls.io/builds/47186892/badge)](https://coveralls.io/builds/47186892)
   
   Coverage decreased (-0.05%) to 51.591% when pulling **a7fe863e6958e93aef04e69eba6f6cc0e008059f on zhangjidi2016:optimize_code** into **7a5d937c76c2b99e65a18388f9c3acb3d80afd16 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.

To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org