You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "mxsm (via GitHub)" <gi...@apache.org> on 2023/01/29 13:33:07 UTC
[GitHub] [rocketmq] mxsm opened a new pull request, #5948: [ISSUE #5947]Optimize RouteInfoManager#pickupTopicRouteData create BrokerData code
mxsm opened a new pull request, #5948:
URL: https://github.com/apache/rocketmq/pull/5948
**Make sure set the target branch to `develop`**
## What is the purpose of the change
close #5947
## Brief changelog
- Optimize RouteInfoManager#pickupTopicRouteData create BrokerData code
## 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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq] mxsm commented on a diff in pull request #5948: [ISSUE #5947]Optimize RouteInfoManager#pickupTopicRouteData create BrokerData code
Posted by "mxsm (via GitHub)" <gi...@apache.org>.
mxsm commented on code in PR #5948:
URL: https://github.com/apache/rocketmq/pull/5948#discussion_r1090138679
##########
namesrv/src/main/java/org/apache/rocketmq/namesrv/routeinfo/RouteInfoManager.java:
##########
@@ -678,10 +678,7 @@ public TopicRouteData pickupTopicRouteData(final String topic) {
if (null == brokerData) {
continue;
}
- BrokerData brokerDataClone = new BrokerData(brokerData.getCluster(),
- brokerData.getBrokerName(),
- (HashMap<Long, String>) brokerData.getBrokerAddrs().clone(),
- brokerData.isEnableActingMaster(), brokerData.getZoneName());
+ BrokerData brokerDataClone = new BrokerData(brokerData);
Review Comment:
> why not make a deep copy of a BrokerData
I see that the constructor does the job @fuyou001
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq] RongtongJin merged pull request #5948: [ISSUE #5947]Optimize RouteInfoManager#pickupTopicRouteData create BrokerData code
Posted by "RongtongJin (via GitHub)" <gi...@apache.org>.
RongtongJin merged PR #5948:
URL: https://github.com/apache/rocketmq/pull/5948
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq] mxsm commented on a diff in pull request #5948: [ISSUE #5947]Optimize RouteInfoManager#pickupTopicRouteData create BrokerData code
Posted by "mxsm (via GitHub)" <gi...@apache.org>.
mxsm commented on code in PR #5948:
URL: https://github.com/apache/rocketmq/pull/5948#discussion_r1090138679
##########
namesrv/src/main/java/org/apache/rocketmq/namesrv/routeinfo/RouteInfoManager.java:
##########
@@ -678,10 +678,7 @@ public TopicRouteData pickupTopicRouteData(final String topic) {
if (null == brokerData) {
continue;
}
- BrokerData brokerDataClone = new BrokerData(brokerData.getCluster(),
- brokerData.getBrokerName(),
- (HashMap<Long, String>) brokerData.getBrokerAddrs().clone(),
- brokerData.isEnableActingMaster(), brokerData.getZoneName());
+ BrokerData brokerDataClone = new BrokerData(brokerData);
Review Comment:
> why not make a deep copy of a BrokerData
I see that the constructor does the job @fuyou001 , I'm going to add a deep clone method to each of the three classes(TopicRouteData,QueueData,BrokerData) when submitting a 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.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq] fuyou001 commented on a diff in pull request #5948: [ISSUE #5947]Optimize RouteInfoManager#pickupTopicRouteData create BrokerData code
Posted by "fuyou001 (via GitHub)" <gi...@apache.org>.
fuyou001 commented on code in PR #5948:
URL: https://github.com/apache/rocketmq/pull/5948#discussion_r1090137307
##########
namesrv/src/main/java/org/apache/rocketmq/namesrv/routeinfo/RouteInfoManager.java:
##########
@@ -678,10 +678,7 @@ public TopicRouteData pickupTopicRouteData(final String topic) {
if (null == brokerData) {
continue;
}
- BrokerData brokerDataClone = new BrokerData(brokerData.getCluster(),
- brokerData.getBrokerName(),
- (HashMap<Long, String>) brokerData.getBrokerAddrs().clone(),
- brokerData.isEnableActingMaster(), brokerData.getZoneName());
+ BrokerData brokerDataClone = new BrokerData(brokerData);
Review Comment:
why not make a deep copy of a BrokerData
--
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: commits-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 #5948: [ISSUE #5947]Optimize RouteInfoManager#pickupTopicRouteData create BrokerData code
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #5948:
URL: https://github.com/apache/rocketmq/pull/5948#issuecomment-1407670799
# [Codecov](https://codecov.io/gh/apache/rocketmq/pull/5948?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 [#5948](https://codecov.io/gh/apache/rocketmq/pull/5948?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (ff2aaae) into [develop](https://codecov.io/gh/apache/rocketmq/commit/bcaebf19e6f9858bf4566fa2d305181fe324d014?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (bcaebf1) will **decrease** coverage by `0.06%`.
> The diff coverage is `25.00%`.
```diff
@@ Coverage Diff @@
## develop #5948 +/- ##
=============================================
- Coverage 43.37% 43.31% -0.06%
Complexity 8798 8798
=============================================
Files 1090 1090
Lines 76435 76433 -2
Branches 9987 9987
=============================================
- Hits 33150 33108 -42
- Misses 39137 39176 +39
- Partials 4148 4149 +1
```
| [Impacted Files](https://codecov.io/gh/apache/rocketmq/pull/5948?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...e/rocketmq/remoting/protocol/route/BrokerData.java](https://codecov.io/gh/apache/rocketmq/pull/5948?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cmVtb3Rpbmcvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3JlbW90aW5nL3Byb3RvY29sL3JvdXRlL0Jyb2tlckRhdGEuamF2YQ==) | `30.00% <0.00%> (-0.44%)` | :arrow_down: |
| [...e/rocketmq/namesrv/routeinfo/RouteInfoManager.java](https://codecov.io/gh/apache/rocketmq/pull/5948?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-bmFtZXNydi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcm9ja2V0bXEvbmFtZXNydi9yb3V0ZWluZm8vUm91dGVJbmZvTWFuYWdlci5qYXZh) | `63.25% <100.00%> (-0.18%)` | :arrow_down: |
| [...ache/rocketmq/broker/client/ConsumerGroupInfo.java](https://codecov.io/gh/apache/rocketmq/pull/5948?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YnJva2VyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9icm9rZXIvY2xpZW50L0NvbnN1bWVyR3JvdXBJbmZvLmphdmE=) | `69.29% <0.00%> (-3.51%)` | :arrow_down: |
| [...a/org/apache/rocketmq/broker/BrokerController.java](https://codecov.io/gh/apache/rocketmq/pull/5948?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YnJva2VyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9icm9rZXIvQnJva2VyQ29udHJvbGxlci5qYXZh) | `43.25% <0.00%> (-3.43%)` | :arrow_down: |
| [...rocketmq/common/message/MessageClientIDSetter.java](https://codecov.io/gh/apache/rocketmq/pull/5948?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jb21tb24vbWVzc2FnZS9NZXNzYWdlQ2xpZW50SURTZXR0ZXIuamF2YQ==) | `71.42% <0.00%> (-2.39%)` | :arrow_down: |
| [...va/org/apache/rocketmq/store/util/PerfCounter.java](https://codecov.io/gh/apache/rocketmq/pull/5948?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3RvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3N0b3JlL3V0aWwvUGVyZkNvdW50ZXIuamF2YQ==) | `64.39% <0.00%> (-2.10%)` | :arrow_down: |
| [...ache/rocketmq/proxy/common/ReceiptHandleGroup.java](https://codecov.io/gh/apache/rocketmq/pull/5948?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHJveHkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3Byb3h5L2NvbW1vbi9SZWNlaXB0SGFuZGxlR3JvdXAuamF2YQ==) | `65.30% <0.00%> (-2.05%)` | :arrow_down: |
| [...he/rocketmq/broker/processor/PopReviveService.java](https://codecov.io/gh/apache/rocketmq/pull/5948?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YnJva2VyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9icm9rZXIvcHJvY2Vzc29yL1BvcFJldml2ZVNlcnZpY2UuamF2YQ==) | `39.41% <0.00%> (-1.35%)` | :arrow_down: |
| [...ent/impl/consumer/DefaultLitePullConsumerImpl.java](https://codecov.io/gh/apache/rocketmq/pull/5948?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvaW1wbC9jb25zdW1lci9EZWZhdWx0TGl0ZVB1bGxDb25zdW1lckltcGwuamF2YQ==) | `68.12% <0.00%> (-0.79%)` | :arrow_down: |
| [...a/org/apache/rocketmq/store/StoreStatsService.java](https://codecov.io/gh/apache/rocketmq/pull/5948?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3RvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3N0b3JlL1N0b3JlU3RhdHNTZXJ2aWNlLmphdmE=) | `33.97% <0.00%> (-0.56%)` | :arrow_down: |
| ... and [10 more](https://codecov.io/gh/apache/rocketmq/pull/5948?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
:mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org