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 2021/09/24 09:29:27 UTC
[GitHub] [rocketmq] maixiaohai opened a new pull request #3373: [ISSUE #3371]Part 3: Add ak and ck stats to broker stats manager
maixiaohai opened a new pull request #3373:
URL: https://github.com/apache/rocketmq/pull/3373
## What is the purpose of the change
issue #3371
## Brief changelog
Add stats about ak and ck message.
## 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] Jason918 commented on a change in pull request #3373: [ISSUE #3371]Part D: Add ak and ck stats to broker stats manager
Posted by GitBox <gi...@apache.org>.
Jason918 commented on a change in pull request #3373:
URL: https://github.com/apache/rocketmq/pull/3373#discussion_r721853500
##########
File path: broker/src/main/java/org/apache/rocketmq/broker/processor/PopBufferMergeService.java
##########
@@ -536,6 +537,12 @@ private void putCkToStore(final PopCheckPointWrapper pointWrapper, final boolean
POP_LOGGER.error("[PopBuffer]put ck to store fail: {}, {}", pointWrapper, putMessageResult);
return;
}
+
+ this.brokerController.getBrokerStatsManager().incTopicPutNums(TopicValidator.RMQ_SYS_SCHEDULE_TOPIC, putMessageResult.getAppendMessageResult().getMsgNum(), 1);
Review comment:
And it's duplicated codes, it's better to put these codes into a new method in BrokerStatsManager?
##########
File path: broker/src/main/java/org/apache/rocketmq/broker/processor/AckMessageProcessor.java
##########
@@ -181,6 +182,11 @@ private RemotingCommand processRequest(final Channel channel, RemotingCommand re
&& putMessageResult.getPutMessageStatus() != PutMessageStatus.FLUSH_SLAVE_TIMEOUT
&& putMessageResult.getPutMessageStatus() != PutMessageStatus.SLAVE_NOT_AVAILABLE) {
POP_LOGGER.error("put ack msg error:" + putMessageResult);
+ } else {
+ this.brokerController.getBrokerStatsManager().incTopicPutNums(TopicValidator.RMQ_SYS_SCHEDULE_TOPIC, putMessageResult.getAppendMessageResult().getMsgNum(), 1);
Review comment:
This line is too long, please pay attention to the code format.
--
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 #3373: [ISSUE #3371]Part D: Add ak and ck stats to broker stats manager
Posted by GitBox <gi...@apache.org>.
coveralls commented on pull request #3373:
URL: https://github.com/apache/rocketmq/pull/3373#issuecomment-955200572
[](https://coveralls.io/builds/43891578)
Coverage decreased (-0.04%) to 53.289% when pulling **17f282231e4ff5ea5b70e016e601beb5b53f7189 on maixiaohai:add_ak_ck_write_stats_to_schedule_topic** into **dd09ba1ec869acb1538d2c73f98d44066bbbb00f on apache:5.0.0-alpha**.
--
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 #3373: [ISSUE #3371]Part D: Add ak and ck stats to broker stats manager
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #3373:
URL: https://github.com/apache/rocketmq/pull/3373#issuecomment-955200589
# [Codecov](https://codecov.io/gh/apache/rocketmq/pull/3373?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 [#3373](https://codecov.io/gh/apache/rocketmq/pull/3373?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (17f2822) into [5.0.0-alpha](https://codecov.io/gh/apache/rocketmq/commit/48d3c7eeba3d6658de10b5d8fd5890b513a16eb5?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (48d3c7e) will **increase** coverage by `0.05%`.
> The diff coverage is `66.66%`.
[](https://codecov.io/gh/apache/rocketmq/pull/3373?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 @@
## 5.0.0-alpha #3373 +/- ##
=================================================
+ Coverage 46.81% 46.87% +0.05%
- Complexity 4965 4977 +12
=================================================
Files 610 612 +2
Lines 41966 42024 +58
Branches 5757 5739 -18
=================================================
+ Hits 19647 19698 +51
- Misses 19671 19682 +11
+ Partials 2648 2644 -4
```
| [Impacted Files](https://codecov.io/gh/apache/rocketmq/pull/3373?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...cketmq/broker/processor/PopBufferMergeService.java](https://codecov.io/gh/apache/rocketmq/pull/3373/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-YnJva2VyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9icm9rZXIvcHJvY2Vzc29yL1BvcEJ1ZmZlck1lcmdlU2VydmljZS5qYXZh) | `45.47% <50.00%> (+0.34%)` | :arrow_up: |
| [...rocketmq/broker/processor/AckMessageProcessor.java](https://codecov.io/gh/apache/rocketmq/pull/3373/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-YnJva2VyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9icm9rZXIvcHJvY2Vzc29yL0Fja01lc3NhZ2VQcm9jZXNzb3IuamF2YQ==) | `47.00% <100.00%> (+2.20%)` | :arrow_up: |
| [...apache/rocketmq/broker/longpolling/PopRequest.java](https://codecov.io/gh/apache/rocketmq/pull/3373/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-YnJva2VyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9icm9rZXIvbG9uZ3BvbGxpbmcvUG9wUmVxdWVzdC5qYXZh) | `31.03% <0.00%> (-13.80%)` | :arrow_down: |
| [...org/apache/rocketmq/store/ha/WaitNotifyObject.java](https://codecov.io/gh/apache/rocketmq/pull/3373/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%> (-12.78%)` | :arrow_down: |
| [...rocketmq/broker/pagecache/ManyMessageTransfer.java](https://codecov.io/gh/apache/rocketmq/pull/3373/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-YnJva2VyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9icm9rZXIvcGFnZWNhY2hlL01hbnlNZXNzYWdlVHJhbnNmZXIuamF2YQ==) | `36.36% <0.00%> (-9.80%)` | :arrow_down: |
| [.../rocketmq/broker/pagecache/OneMessageTransfer.java](https://codecov.io/gh/apache/rocketmq/pull/3373/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-YnJva2VyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9icm9rZXIvcGFnZWNhY2hlL09uZU1lc3NhZ2VUcmFuc2Zlci5qYXZh) | `24.00% <0.00%> (-9.34%)` | :arrow_down: |
| [...org/apache/rocketmq/common/stats/StatsItemSet.java](https://codecov.io/gh/apache/rocketmq/pull/3373/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=) | `41.79% <0.00%> (-8.96%)` | :arrow_down: |
| [...ocketmq/broker/processor/SendMessageProcessor.java](https://codecov.io/gh/apache/rocketmq/pull/3373/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-YnJva2VyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9icm9rZXIvcHJvY2Vzc29yL1NlbmRNZXNzYWdlUHJvY2Vzc29yLmphdmE=) | `39.89% <0.00%> (-7.29%)` | :arrow_down: |
| [.../java/org/apache/rocketmq/acl/common/AclUtils.java](https://codecov.io/gh/apache/rocketmq/pull/3373/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-YWNsL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9hY2wvY29tbW9uL0FjbFV0aWxzLmphdmE=) | `79.85% <0.00%> (-3.27%)` | :arrow_down: |
| [...ketmq/client/impl/consumer/PullMessageService.java](https://codecov.io/gh/apache/rocketmq/pull/3373/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-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvaW1wbC9jb25zdW1lci9QdWxsTWVzc2FnZVNlcnZpY2UuamF2YQ==) | `52.30% <0.00%> (-3.08%)` | :arrow_down: |
| ... and [57 more](https://codecov.io/gh/apache/rocketmq/pull/3373/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/3373?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/3373?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 [48d3c7e...17f2822](https://codecov.io/gh/apache/rocketmq/pull/3373?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] maixiaohai commented on a change in pull request #3373: [ISSUE #3371]Part D: Add ak and ck stats to broker stats manager
Posted by GitBox <gi...@apache.org>.
maixiaohai commented on a change in pull request #3373:
URL: https://github.com/apache/rocketmq/pull/3373#discussion_r727040648
##########
File path: broker/src/main/java/org/apache/rocketmq/broker/processor/PopBufferMergeService.java
##########
@@ -536,6 +537,12 @@ private void putCkToStore(final PopCheckPointWrapper pointWrapper, final boolean
POP_LOGGER.error("[PopBuffer]put ck to store fail: {}, {}", pointWrapper, putMessageResult);
return;
}
+
+ this.brokerController.getBrokerStatsManager().incTopicPutNums(TopicValidator.RMQ_SYS_SCHEDULE_TOPIC, putMessageResult.getAppendMessageResult().getMsgNum(), 1);
Review comment:
Thanks for your advice~ I'll check 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