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/06/20 10:11:31 UTC

[GitHub] [rocketmq] zhangjidi2016 opened a new pull request, #4488: [ISSUE #4487]The trackType is wrong when the consumer in broadcasting subscription.

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

   
   **Make sure set the target branch to `develop`**
   
   ## What is the purpose of the change
   
   #4487
   
   ## 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] zhangjidi2016 closed pull request #4488: [ISSUE #4487]The trackType is wrong when the consumer in broadcasting subscription.

Posted by GitBox <gi...@apache.org>.
zhangjidi2016 closed pull request #4488: [ISSUE #4487]The trackType is wrong when the consumer in broadcasting subscription.
URL: https://github.com/apache/rocketmq/pull/4488


-- 
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] tsunghanjacktsai commented on a diff in pull request #4488: [ISSUE #4487]The trackType is wrong when the consumer in broadcasting subscription.

Posted by GitBox <gi...@apache.org>.
tsunghanjacktsai commented on code in PR #4488:
URL: https://github.com/apache/rocketmq/pull/4488#discussion_r902108319


##########
tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java:
##########
@@ -320,8 +321,18 @@ public ConsumeStats examineConsumeStats(String consumerGroup,
         }
 
         if (result.getOffsetTable().isEmpty()) {
-            throw new MQClientException(ResponseCode.CONSUMER_NOT_ONLINE,
-                "Not found the consumer group consume stats, because return offset table is empty, maybe the consumer not consume any message");
+            ConsumerConnection connection;
+            try {
+                connection = this.examineConsumerConnectionInfo(consumerGroup);
+            } catch (Exception e) {
+                throw new MQClientException(ResponseCode.CONSUMER_NOT_ONLINE,
+                    "Not found the consumer group consume stats, because return offset table is empty, maybe the consumer not online");
+            }
+
+            if (connection.getMessageModel().equals(MessageModel.BROADCASTING)) {
+                throw new MQClientException(ResponseCode.CONSUME_BROADCASTING,
+                    "Not found the consumer group consume stats, because return offset table is empty, the consumer using in broadcast model");

Review Comment:
   Hi @zhangjidi2016 ,
   
   Thx for your contribution.
   
   Please rephrase the "the consumer using in broadcast model" into "the consumer is under the broadcast mode". A good exception message would make us more perfect :-)



##########
common/src/main/java/org/apache/rocketmq/common/protocol/ResponseCode.java:
##########
@@ -80,4 +80,6 @@ public class ResponseCode extends RemotingSysResponseCode {
 
     public static final int UPDATE_GLOBAL_WHITE_ADDRS_CONFIG_FAILED = 211;
 
+    public static final int CONSUME_BROADCASTING = 212;

Review Comment:
   Would prefer "BROADCAST_CONSUMPTION".



-- 
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 #4488: [ISSUE #4487]The trackType is wrong when the consumer in broadcasting subscription.

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

   # [Codecov](https://codecov.io/gh/apache/rocketmq/pull/4488?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 [#4488](https://codecov.io/gh/apache/rocketmq/pull/4488?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (8300744) into [develop](https://codecov.io/gh/apache/rocketmq/commit/f34c185e05f5b1a1cc372fa72718d6b40ed6e5cc?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f34c185) will **decrease** coverage by `0.26%`.
   > The diff coverage is `50.00%`.
   
   ```diff
   @@              Coverage Diff              @@
   ##             develop    #4488      +/-   ##
   =============================================
   - Coverage      48.13%   47.87%   -0.27%     
   + Complexity      5129     5083      -46     
   =============================================
     Files            649      649              
     Lines          43021    43031      +10     
     Branches        5625     5628       +3     
   =============================================
   - Hits           20709    20601     -108     
   - Misses         19808    19916     +108     
   - Partials        2504     2514      +10     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/rocketmq/pull/4488?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [.../apache/rocketmq/common/protocol/ResponseCode.java](https://codecov.io/gh/apache/rocketmq/pull/4488/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-Y29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jb21tb24vcHJvdG9jb2wvUmVzcG9uc2VDb2RlLmphdmE=) | `0.00% <ø> (ø)` | |
   | [.../tools/command/message/QueryMsgByIdSubCommand.java](https://codecov.io/gh/apache/rocketmq/pull/4488/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-dG9vbHMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3Rvb2xzL2NvbW1hbmQvbWVzc2FnZS9RdWVyeU1zZ0J5SWRTdWJDb21tYW5kLmphdmE=) | `0.00% <0.00%> (ø)` | |
   | [...he/rocketmq/tools/admin/DefaultMQAdminExtImpl.java](https://codecov.io/gh/apache/rocketmq/pull/4488/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-dG9vbHMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3Rvb2xzL2FkbWluL0RlZmF1bHRNUUFkbWluRXh0SW1wbC5qYXZh) | `40.81% <50.00%> (+1.83%)` | :arrow_up: |
   | [...org/apache/rocketmq/tools/admin/api/TrackType.java](https://codecov.io/gh/apache/rocketmq/pull/4488/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-dG9vbHMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3Rvb2xzL2FkbWluL2FwaS9UcmFja1R5cGUuamF2YQ==) | `100.00% <100.00%> (ø)` | |
   | [...rg/apache/rocketmq/common/stats/StatsSnapshot.java](https://codecov.io/gh/apache/rocketmq/pull/4488/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-Y29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jb21tb24vc3RhdHMvU3RhdHNTbmFwc2hvdC5qYXZh) | `84.61% <0.00%> (-15.39%)` | :arrow_down: |
   | [.../apache/rocketmq/common/stats/MomentStatsItem.java](https://codecov.io/gh/apache/rocketmq/pull/4488/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-Y29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jb21tb24vc3RhdHMvTW9tZW50U3RhdHNJdGVtLmphdmE=) | `38.09% <0.00%> (-9.53%)` | :arrow_down: |
   | [...va/org/apache/rocketmq/store/FlushDiskWatcher.java](https://codecov.io/gh/apache/rocketmq/pull/4488/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/common/stats/StatsItemSet.java](https://codecov.io/gh/apache/rocketmq/pull/4488/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-Y29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jb21tb24vc3RhdHMvU3RhdHNJdGVtU2V0LmphdmE=) | `44.77% <0.00%> (-8.96%)` | :arrow_down: |
   | [...ache/rocketmq/common/stats/MomentStatsItemSet.java](https://codecov.io/gh/apache/rocketmq/pull/4488/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=) | `39.13% <0.00%> (-8.70%)` | :arrow_down: |
   | [...va/org/apache/rocketmq/logging/inner/Appender.java](https://codecov.io/gh/apache/rocketmq/pull/4488/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-bG9nZ2luZy9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcm9ja2V0bXEvbG9nZ2luZy9pbm5lci9BcHBlbmRlci5qYXZh) | `29.21% <0.00%> (-7.87%)` | :arrow_down: |
   | ... and [26 more](https://codecov.io/gh/apache/rocketmq/pull/4488/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/4488?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/4488?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 [f34c185...8300744](https://codecov.io/gh/apache/rocketmq/pull/4488?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] Oliverwqcwrw commented on pull request #4488: [ISSUE #4487]The trackType is wrong when the consumer in broadcasting subscription.

Posted by GitBox <gi...@apache.org>.
Oliverwqcwrw commented on PR #4488:
URL: https://github.com/apache/rocketmq/pull/4488#issuecomment-1175854297

   I packed and tested that the trackType was always NOT_CONSUME_YET, but it was SUCCESS in  Consume MessageTrace
   
   


-- 
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] tsunghanjacktsai commented on a diff in pull request #4488: [ISSUE #4487]The trackType is wrong when the consumer in broadcasting subscription.

Posted by GitBox <gi...@apache.org>.
tsunghanjacktsai commented on code in PR #4488:
URL: https://github.com/apache/rocketmq/pull/4488#discussion_r902110450


##########
common/src/main/java/org/apache/rocketmq/common/protocol/ResponseCode.java:
##########
@@ -80,4 +80,6 @@ public class ResponseCode extends RemotingSysResponseCode {
 
     public static final int UPDATE_GLOBAL_WHITE_ADDRS_CONFIG_FAILED = 211;
 
+    public static final int CONSUME_BROADCASTING = 212;

Review Comment:
   "BROADCAST_CONSUMPTION" should be better.



-- 
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 #4488: [ISSUE #4487]The trackType is wrong when the consumer in broadcasting subscription.

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

   
   [![Coverage Status](https://coveralls.io/builds/50175760/badge)](https://coveralls.io/builds/50175760)
   
   Coverage decreased (-0.2%) to 51.8% when pulling **e668c975d3212b295b2ee1cd6333304dd8daf8cf on zhangjidi2016:fix_boardcast_consume_status** into **32733e76747f3db761ace75cfed6d6fdcdaee81a 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] zhangjidi2016 commented on a diff in pull request #4488: [ISSUE #4487]The trackType is wrong when the consumer in broadcasting subscription.

Posted by GitBox <gi...@apache.org>.
zhangjidi2016 commented on code in PR #4488:
URL: https://github.com/apache/rocketmq/pull/4488#discussion_r902112423


##########
common/src/main/java/org/apache/rocketmq/common/protocol/ResponseCode.java:
##########
@@ -80,4 +80,6 @@ public class ResponseCode extends RemotingSysResponseCode {
 
     public static final int UPDATE_GLOBAL_WHITE_ADDRS_CONFIG_FAILED = 211;
 
+    public static final int CONSUME_BROADCASTING = 212;

Review Comment:
   Good suggestion. I'll change it later



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