You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "yp969803 (via GitHub)" <gi...@apache.org> on 2023/12/16 19:32:44 UTC
[PR] [ISSUE #7481] Remove invalid key/value in logPolling map (#7481) [rocketmq]
yp969803 opened a new pull request, #7670:
URL: https://github.com/apache/rocketmq/pull/7670
<!-- 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 #7481
### Brief Description
Removed invalid key/value in logPolling map
<!-- Write a brief description for your pull request to help the maintainer understand the reasons behind your changes. -->
### How Did You Test This Change?
using mvn test
<!-- 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 #7481] Remove invalid key/value in logPolling map (#7481) [rocketmq]
Posted by "cserwen (via GitHub)" <gi...@apache.org>.
cserwen commented on code in PR #7670:
URL: https://github.com/apache/rocketmq/pull/7670#discussion_r1507475276
##########
broker/src/main/java/org/apache/rocketmq/broker/longpolling/PullRequestHoldService.java:
##########
@@ -174,7 +174,15 @@ public void notifyMessageArriving(final String topic, final int queueId, final l
mpr.addPullRequest(replayList);
}
}
+ else if (null == requestList) {
+ this.pullRequestTable.remove(key);
+ }
+
+ }
+ else if (null == mpr) {
Review Comment:
pullRequestTable is ConcurrentHashMap, so null means this key is not existed, so this branch is redundant
##########
broker/src/main/java/org/apache/rocketmq/broker/longpolling/PullRequestHoldService.java:
##########
@@ -174,7 +174,15 @@ public void notifyMessageArriving(final String topic, final int queueId, final l
mpr.addPullRequest(replayList);
}
}
+ else if (null == requestList) {
Review Comment:
`else` no need to newLine
--
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 #7481] Remove invalid key/value in logPolling map (#7481) [rocketmq]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #7670:
URL: https://github.com/apache/rocketmq/pull/7670#issuecomment-1858918455
## [Codecov](https://app.codecov.io/gh/apache/rocketmq/pull/7670?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
Attention: `3 lines` in your changes are missing coverage. Please review.
> Comparison is base [(`7e17867`)](https://app.codecov.io/gh/apache/rocketmq/commit/7e1786732cfc1a4e02a17535bed9af2115c18822?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) 43.13% compared to head [(`b6a6839`)](https://app.codecov.io/gh/apache/rocketmq/pull/7670?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) 43.18%.
| [Files](https://app.codecov.io/gh/apache/rocketmq/pull/7670?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
|---|---|---|
| [...tmq/broker/longpolling/PullRequestHoldService.java](https://app.codecov.io/gh/apache/rocketmq/pull/7670?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-YnJva2VyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9icm9rZXIvbG9uZ3BvbGxpbmcvUHVsbFJlcXVlc3RIb2xkU2VydmljZS5qYXZh) | 40.00% | [2 Missing and 1 partial :warning: ](https://app.codecov.io/gh/apache/rocketmq/pull/7670?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 #7670 +/- ##
=============================================
+ Coverage 43.13% 43.18% +0.04%
Complexity 9800 9800
=============================================
Files 1165 1165
Lines 84480 84486 +6
Branches 10967 10969 +2
=============================================
+ Hits 36442 36484 +42
+ Misses 43518 43475 -43
- Partials 4520 4527 +7
```
</details>
[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/rocketmq/pull/7670?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
Re: [PR] [ISSUE #7481] Remove invalid key/value in logPolling map (#7481) [rocketmq]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #7670:
URL: https://github.com/apache/rocketmq/pull/7670#issuecomment-2691749806
This PR is stale because it has been open for 365 days with no activity. It will be closed in 3 days if no further activity occurs. If you wish not to mark it as stale, please leave a comment in this 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
Re: [PR] [ISSUE #7481] Remove invalid key/value in logPolling map (#7481) [rocketmq]
Posted by "yp969803 (via GitHub)" <gi...@apache.org>.
yp969803 commented on PR #7670:
URL: https://github.com/apache/rocketmq/pull/7670#issuecomment-1971357241
@cserwen done
--
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 #7481] Remove invalid key/value in logPolling map (#7481) [rocketmq]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #7670:
URL: https://github.com/apache/rocketmq/pull/7670#issuecomment-3981374908
This PR is stale because it has been open for 365 days with no activity. It will be closed in 3 days if no further activity occurs. If you wish not to mark it as stale, please leave a comment in this 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
Re: [PR] [ISSUE #7481] Remove invalid key/value in logPolling map (#7481) [rocketmq]
Posted by "cserwen (via GitHub)" <gi...@apache.org>.
cserwen commented on code in PR #7670:
URL: https://github.com/apache/rocketmq/pull/7670#discussion_r1507478259
##########
broker/src/main/java/org/apache/rocketmq/broker/longpolling/PullRequestHoldService.java:
##########
@@ -174,7 +174,15 @@ public void notifyMessageArriving(final String topic, final int queueId, final l
mpr.addPullRequest(replayList);
}
}
+ else if (null == requestList) {
Review Comment:
codeStyle, `else` no need to newLine
--
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 #7481] Remove invalid key/value in logPolling map (#7481) [rocketmq]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #7670:
URL: https://github.com/apache/rocketmq/pull/7670#issuecomment-4001141696
This PR was closed because it has been inactive for 3 days since being marked as stale.
--
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 #7481] Remove invalid key/value in logPolling map (#7481) [rocketmq]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #7670: [ISSUE #7481] Remove invalid key/value in logPolling map (#7481)
URL: https://github.com/apache/rocketmq/pull/7670
--
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 #7481] Remove invalid key/value in logPolling map (#7481) [rocketmq]
Posted by "yp969803 (via GitHub)" <gi...@apache.org>.
yp969803 commented on PR #7670:
URL: https://github.com/apache/rocketmq/pull/7670#issuecomment-1971320376
@cserwen done the changes
--
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 #7481] Remove invalid key/value in logPolling map (#7481) [rocketmq]
Posted by "cserwen (via GitHub)" <gi...@apache.org>.
cserwen commented on code in PR #7670:
URL: https://github.com/apache/rocketmq/pull/7670#discussion_r1507475276
##########
broker/src/main/java/org/apache/rocketmq/broker/longpolling/PullRequestHoldService.java:
##########
@@ -174,7 +174,15 @@ public void notifyMessageArriving(final String topic, final int queueId, final l
mpr.addPullRequest(replayList);
}
}
+ else if (null == requestList) {
+ this.pullRequestTable.remove(key);
+ }
+
+ }
+ else if (null == mpr) {
Review Comment:
pullRequestTable is ConcurrentHashMap, so null means this key is not existed, this branch is redundant
--
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 #7481] Remove invalid key/value in logPolling map (#7481) [rocketmq]
Posted by "yp969803 (via GitHub)" <gi...@apache.org>.
yp969803 commented on PR #7670:
URL: https://github.com/apache/rocketmq/pull/7670#issuecomment-1858914103
@joeCarf can you verify this 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
Re: [PR] [ISSUE #7481] Remove invalid key/value in logPolling map (#7481) [rocketmq]
Posted by "yp969803 (via GitHub)" <gi...@apache.org>.
yp969803 commented on PR #7670:
URL: https://github.com/apache/rocketmq/pull/7670#issuecomment-2692343213
@joeCarf can you merge the 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