You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "yx9o (via GitHub)" <gi...@apache.org> on 2025/01/09 05:01:22 UTC
[PR] [ISSUE #9115] Optimize the broker's reverse notification for consumerId change [rocketmq]
yx9o opened a new pull request, #9116:
URL: https://github.com/apache/rocketmq/pull/9116
Fixes #9115 .
--
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 #9115] Optimize the broker's reverse notification for consumerId change [rocketmq]
Posted by "Koado (via GitHub)" <gi...@apache.org>.
Koado commented on code in PR #9116:
URL: https://github.com/apache/rocketmq/pull/9116#discussion_r1983318956
##########
broker/src/main/java/org/apache/rocketmq/broker/client/DefaultConsumerIdsChangeListener.java:
##########
@@ -125,4 +145,27 @@ private void notifyConsumerChange() {
public void shutdown() {
this.scheduledExecutorService.shutdown();
}
+
+ private static class NotifyTaskControl {
+
+ private final AtomicBoolean interrupted = new AtomicBoolean(false);
+
+ private final List<Channel> channels;
Review Comment:
What is the role of channels in NotifyTaskControl?
--
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 #9115] Optimize the broker's reverse notification for consumerId change [rocketmq]
Posted by "yx9o (via GitHub)" <gi...@apache.org>.
yx9o commented on code in PR #9116:
URL: https://github.com/apache/rocketmq/pull/9116#discussion_r1984317175
##########
broker/src/main/java/org/apache/rocketmq/broker/client/DefaultConsumerIdsChangeListener.java:
##########
@@ -125,4 +145,27 @@ private void notifyConsumerChange() {
public void shutdown() {
this.scheduledExecutorService.shutdown();
}
+
+ private static class NotifyTaskControl {
+
+ private final AtomicBoolean interrupted = new AtomicBoolean(false);
+
+ private final List<Channel> channels;
Review Comment:
Ensure that when a new notification task arrives, the channels in the old notification task are no longer notified.
--
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 #9115] Optimize the broker's reverse notification for consumerId change [rocketmq]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #9116:
URL: https://github.com/apache/rocketmq/pull/9116#issuecomment-2579211551
## [Codecov](https://app.codecov.io/gh/apache/rocketmq/pull/9116?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
Attention: Patch coverage is `61.90476%` with `8 lines` in your changes missing coverage. Please review.
> Project coverage is 47.94%. Comparing base [(`e0db654`)](https://app.codecov.io/gh/apache/rocketmq/commit/e0db6545b00770e8f41bf55cfb560ac79f9a17c9?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to head [(`6a47b12`)](https://app.codecov.io/gh/apache/rocketmq/commit/6a47b123101d244294b1e69c254f46b29d6c3e42?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
| [Files with missing lines](https://app.codecov.io/gh/apache/rocketmq/pull/9116?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
|---|---|---|
| [...roker/client/DefaultConsumerIdsChangeListener.java](https://app.codecov.io/gh/apache/rocketmq/pull/9116?src=pr&el=tree&filepath=broker%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Frocketmq%2Fbroker%2Fclient%2FDefaultConsumerIdsChangeListener.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-YnJva2VyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9icm9rZXIvY2xpZW50L0RlZmF1bHRDb25zdW1lcklkc0NoYW5nZUxpc3RlbmVyLmphdmE=) | 61.90% | [5 Missing and 3 partials :warning: ](https://app.codecov.io/gh/apache/rocketmq/pull/9116?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 #9116 +/- ##
=============================================
- Coverage 48.05% 47.94% -0.11%
+ Complexity 12067 12041 -26
=============================================
Files 1320 1320
Lines 92840 92861 +21
Branches 11898 11900 +2
=============================================
- Hits 44613 44523 -90
- Misses 42726 42826 +100
- Partials 5501 5512 +11
```
</details>
[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/rocketmq/pull/9116?dropdown=coverage&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 #9115] Optimize the broker's reverse notification for consumerId change [rocketmq]
Posted by "yx9o (via GitHub)" <gi...@apache.org>.
yx9o commented on PR #9116:
URL: https://github.com/apache/rocketmq/pull/9116#issuecomment-2586493754
> 1. task1 has already done notification
> 2. task2 try interrupt task1 and update map
> 3. task1 remove group in map
>
> if so, task2 will never be interrupted, but it is better than now
Hi, thank you for your review. I added the atomic check here. Please help review it again. Thank you.
--
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 #9115] Optimize the broker's reverse notification for consumerId change [rocketmq]
Posted by "lollipopjin (via GitHub)" <gi...@apache.org>.
lollipopjin merged PR #9116:
URL: https://github.com/apache/rocketmq/pull/9116
--
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 #9115] Optimize the broker's reverse notification for consumerId change [rocketmq]
Posted by "qianye1001 (via GitHub)" <gi...@apache.org>.
qianye1001 commented on PR #9116:
URL: https://github.com/apache/rocketmq/pull/9116#issuecomment-2586398453
1. task1 has already done notification
2. task2 try interrupt task1 and update map
3. task1 remove group in map
if so, task2 will never be interrupted, but it is better than now
--
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 #9115] Optimize the broker's reverse notification for consumerId change [rocketmq]
Posted by "qianye1001 (via GitHub)" <gi...@apache.org>.
qianye1001 commented on PR #9116:
URL: https://github.com/apache/rocketmq/pull/9116#issuecomment-2594585009
LGTM
--
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 #9115] Optimize the broker's reverse notification for consumerId change [rocketmq]
Posted by "Koado (via GitHub)" <gi...@apache.org>.
Koado commented on code in PR #9116:
URL: https://github.com/apache/rocketmq/pull/9116#discussion_r1984346206
##########
broker/src/main/java/org/apache/rocketmq/broker/client/DefaultConsumerIdsChangeListener.java:
##########
@@ -125,4 +145,27 @@ private void notifyConsumerChange() {
public void shutdown() {
this.scheduledExecutorService.shutdown();
}
+
+ private static class NotifyTaskControl {
+
+ private final AtomicBoolean interrupted = new AtomicBoolean(false);
+
+ private final List<Channel> channels;
Review Comment:
I understand that this is controlled by the interrupted flag? once the interrupted flag is true, the for loop will be break.
--
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