You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "RongtongJin (via GitHub)" <gi...@apache.org> on 2023/07/17 03:37:31 UTC
[GitHub] [rocketmq] RongtongJin opened a new pull request, #7030: [ISSUE #7029] Add a config to determine whether pop response should return the actual retry topic or tamper with the original topic
RongtongJin opened a new pull request, #7030:
URL: https://github.com/apache/rocketmq/pull/7030
<!-- 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 #7029
### Brief Description
<!-- Write a brief description for your pull request to help the maintainer understand the reasons behind your changes. -->
Add a config to determine whether pop response should return the actual retry topic or tamper with the original topic
### 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
[GitHub] [rocketmq] lizhimins commented on a diff in pull request #7030: [ISSUE #7029] Add a config to determine whether pop response should return the actual retry topic or tamper with the original topic
Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins commented on code in PR #7030:
URL: https://github.com/apache/rocketmq/pull/7030#discussion_r1266157335
##########
broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:
##########
@@ -589,8 +589,8 @@ private CompletableFuture<Long> popMsgFromQueue(String attemptId, boolean isRetr
atomicRestNum.set(result.getMaxOffset() - result.getNextBeginOffset() + atomicRestNum.get());
String brokerName = brokerController.getBrokerConfig().getBrokerName();
for (SelectMappedBufferResult mapedBuffer : result.getMessageMapedList()) {
- // We should not recode buffer for normal topic message
- if (!isRetry) {
+ // We should not recode buffer when popResponseReturnActualRetryTopic is true or topic is not retry topic
+ if (brokerController.getBrokerConfig().isPopResponseReturnActualRetryTopic() || !isRetry) {
Review Comment:
不对吧,默认是 false,全走下面了
##########
broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:
##########
@@ -589,8 +589,8 @@ private CompletableFuture<Long> popMsgFromQueue(String attemptId, boolean isRetr
atomicRestNum.set(result.getMaxOffset() - result.getNextBeginOffset() + atomicRestNum.get());
String brokerName = brokerController.getBrokerConfig().getBrokerName();
for (SelectMappedBufferResult mapedBuffer : result.getMessageMapedList()) {
- // We should not recode buffer for normal topic message
- if (!isRetry) {
+ // We should not recode buffer when popResponseReturnActualRetryTopic is true or topic is not retry topic
+ if (brokerController.getBrokerConfig().isPopResponseReturnActualRetryTopic() || !isRetry) {
Review Comment:
不对吧,默认是 false,全走下面了
--
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 #7030: [ISSUE #7029] Add a config to determine whether pop response should return the actual retry topic or tamper with the original topic
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #7030:
URL: https://github.com/apache/rocketmq/pull/7030#issuecomment-1637342089
## [Codecov](https://app.codecov.io/gh/apache/rocketmq/pull/7030?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
> Merging [#7030](https://app.codecov.io/gh/apache/rocketmq/pull/7030?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (d43813a) into [develop](https://app.codecov.io/gh/apache/rocketmq/commit/5914ff8dbb9d37e2cb48ef9c4f0256c6185b4659?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (5914ff8) will **increase** coverage by `0.00%`.
> The diff coverage is `20.00%`.
```diff
@@ Coverage Diff @@
## develop #7030 +/- ##
==========================================
Coverage 42.64% 42.65%
- Complexity 9234 9241 +7
==========================================
Files 1136 1136
Lines 80646 80650 +4
Branches 10539 10539
==========================================
+ Hits 34393 34398 +5
Misses 41962 41962
+ Partials 4291 4290 -1
```
| [Impacted Files](https://app.codecov.io/gh/apache/rocketmq/pull/7030?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [...rocketmq/broker/processor/PopMessageProcessor.java](https://app.codecov.io/gh/apache/rocketmq/pull/7030?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-YnJva2VyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9icm9rZXIvcHJvY2Vzc29yL1BvcE1lc3NhZ2VQcm9jZXNzb3IuamF2YQ==) | `45.56% <0.00%> (+0.61%)` | :arrow_up: |
| [.../java/org/apache/rocketmq/common/BrokerConfig.java](https://app.codecov.io/gh/apache/rocketmq/pull/7030?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jb21tb24vQnJva2VyQ29uZmlnLmphdmE=) | `27.28% <25.00%> (-0.02%)` | :arrow_down: |
... and [18 files with indirect coverage changes](https://app.codecov.io/gh/apache/rocketmq/pull/7030/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
: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=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
[GitHub] [rocketmq] lizhimins commented on a diff in pull request #7030: [ISSUE #7029] Add a config to determine whether pop response should return the actual retry topic or tamper with the original topic
Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins commented on code in PR #7030:
URL: https://github.com/apache/rocketmq/pull/7030#discussion_r1266157335
##########
broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:
##########
@@ -589,8 +589,8 @@ private CompletableFuture<Long> popMsgFromQueue(String attemptId, boolean isRetr
atomicRestNum.set(result.getMaxOffset() - result.getNextBeginOffset() + atomicRestNum.get());
String brokerName = brokerController.getBrokerConfig().getBrokerName();
for (SelectMappedBufferResult mapedBuffer : result.getMessageMapedList()) {
- // We should not recode buffer for normal topic message
- if (!isRetry) {
+ // We should not recode buffer when popResponseReturnActualRetryTopic is true or topic is not retry topic
+ if (brokerController.getBrokerConfig().isPopResponseReturnActualRetryTopic() || !isRetry) {
Review Comment:
不对吧,默认是 false,全走下面了
--
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] lizhimins merged pull request #7030: [ISSUE #7029] Add a config to determine whether pop response should return the actual retry topic or tamper with the original topic
Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins merged PR #7030:
URL: https://github.com/apache/rocketmq/pull/7030
--
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