You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "drpmma (via GitHub)" <gi...@apache.org> on 2023/12/15 04:05:10 UTC
[PR] [ISSUE #7543] only call a single type of retry topic in pop [rocketmq]
drpmma opened a new pull request, #7665:
URL: https://github.com/apache/rocketmq/pull/7665
<!-- Please make sure the target branch is right. In most case, the target branch should be `develop`. -->
### Which Issue(s) This PR Fixes
<!-- Please ensure that the related issue has already been created, and [link this pull request to that issue using keywords](<https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword>) to ensure automatic closure. -->
Fixes #7543
### Brief Description
only call a single type of retry topic in pop
<!-- Write a brief description for your pull request to help the maintainer understand the reasons behind your changes. -->
### How Did You Test This Change?
<!-- In order to ensure the code quality of Apache RocketMQ, we expect every pull request to have undergone thorough testing. -->
--
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
Re: [PR] [ISSUE #7543] only call a single type of retry topic in pop [rocketmq]
Posted by "drpmma (via GitHub)" <gi...@apache.org>.
drpmma merged PR #7665:
URL: https://github.com/apache/rocketmq/pull/7665
--
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
Re: [PR] [ISSUE #7543] only call a single type of retry topic in pop [rocketmq]
Posted by "guyinyou (via GitHub)" <gi...@apache.org>.
guyinyou commented on code in PR #7665:
URL: https://github.com/apache/rocketmq/pull/7665#discussion_r1427551399
##########
broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:
##########
@@ -493,8 +509,22 @@ private CompletableFuture<Long> popMsgFromQueue(String attemptId, boolean isRetr
PopMessageRequestHeader requestHeader, int queueId, long restNum, int reviveQid,
Channel channel, long popTime, ExpressionMessageFilter messageFilter, StringBuilder startOffsetInfo,
StringBuilder msgOffsetInfo, StringBuilder orderCountInfo) {
- String topic = isRetry ? KeyBuilder.buildPopRetryTopic(requestHeader.getTopic(),
- requestHeader.getConsumerGroup()) : requestHeader.getTopic();
+ return popMsgFromQueue(attemptId, isRetry, getMessageResult, requestHeader, queueId, restNum, reviveQid, channel,
+ popTime, messageFilter, startOffsetInfo, msgOffsetInfo, orderCountInfo, true);
+ }
+
+ private CompletableFuture<Long> popMsgFromQueue(String attemptId, boolean isRetry, GetMessageResult getMessageResult,
+ PopMessageRequestHeader requestHeader, int queueId, long restNum, int reviveQid,
+ Channel channel, long popTime, ExpressionMessageFilter messageFilter, StringBuilder startOffsetInfo,
+ StringBuilder msgOffsetInfo, StringBuilder orderCountInfo, boolean isRetryV2) {
+ String topic;
Review Comment:
在调用 popMsgFromQueue 之前应该都有一段
this.brokerController.getTopicConfigManager().selectTopicConfig()
的逻辑,其实已经确定好topic名字了,如果直接传进来,是不是就不需要关心v1还是v2了,逻辑更收敛,而且少了一次字符串拼接性能也好一点。
--
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
Re: [PR] [ISSUE #7543] only call a single type of retry topic in pop [rocketmq]
Posted by "drpmma (via GitHub)" <gi...@apache.org>.
drpmma commented on code in PR #7665:
URL: https://github.com/apache/rocketmq/pull/7665#discussion_r1427593336
##########
broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:
##########
@@ -493,8 +509,22 @@ private CompletableFuture<Long> popMsgFromQueue(String attemptId, boolean isRetr
PopMessageRequestHeader requestHeader, int queueId, long restNum, int reviveQid,
Channel channel, long popTime, ExpressionMessageFilter messageFilter, StringBuilder startOffsetInfo,
StringBuilder msgOffsetInfo, StringBuilder orderCountInfo) {
- String topic = isRetry ? KeyBuilder.buildPopRetryTopic(requestHeader.getTopic(),
- requestHeader.getConsumerGroup()) : requestHeader.getTopic();
+ return popMsgFromQueue(attemptId, isRetry, getMessageResult, requestHeader, queueId, restNum, reviveQid, channel,
+ popTime, messageFilter, startOffsetInfo, msgOffsetInfo, orderCountInfo, true);
+ }
+
+ private CompletableFuture<Long> popMsgFromQueue(String attemptId, boolean isRetry, GetMessageResult getMessageResult,
+ PopMessageRequestHeader requestHeader, int queueId, long restNum, int reviveQid,
+ Channel channel, long popTime, ExpressionMessageFilter messageFilter, StringBuilder startOffsetInfo,
+ StringBuilder msgOffsetInfo, StringBuilder orderCountInfo, boolean isRetryV2) {
+ String topic;
Review Comment:
fixed
--
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
Re: [PR] [ISSUE #7543] only call a single type of retry topic in pop [rocketmq]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #7665:
URL: https://github.com/apache/rocketmq/pull/7665#issuecomment-1857260663
## [Codecov](https://app.codecov.io/gh/apache/rocketmq/pull/7665?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
Attention: `21 lines` in your changes are missing coverage. Please review.
> Comparison is base [(`a376fbc`)](https://app.codecov.io/gh/apache/rocketmq/commit/a376fbcdb82e818cfa239da677669f1118e4c40f?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) 43.19% compared to head [(`1d6ba21`)](https://app.codecov.io/gh/apache/rocketmq/pull/7665?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) 43.15%.
> Report is 1 commits behind head on develop.
| [Files](https://app.codecov.io/gh/apache/rocketmq/pull/7665?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
|---|---|---|
| [...rocketmq/broker/processor/PopMessageProcessor.java](https://app.codecov.io/gh/apache/rocketmq/pull/7665?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-YnJva2VyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9icm9rZXIvcHJvY2Vzc29yL1BvcE1lc3NhZ2VQcm9jZXNzb3IuamF2YQ==) | 27.58% | [17 Missing and 4 partials :warning: ](https://app.codecov.io/gh/apache/rocketmq/pull/7665?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## develop #7665 +/- ##
=============================================
- Coverage 43.19% 43.15% -0.04%
+ Complexity 9812 9799 -13
=============================================
Files 1165 1165
Lines 84461 84474 +13
Branches 10964 10968 +4
=============================================
- Hits 36482 36456 -26
- Misses 43454 43488 +34
- Partials 4525 4530 +5
```
</details>
[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/rocketmq/pull/7665?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
--
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