-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[fix] [broker] Close dispatchers stuck due to mismatch between dispatcher.consumerList and dispatcher.consumerSet #22270
[fix] [broker] Close dispatchers stuck due to mismatch between dispatcher.consumerList and dispatcher.consumerSet #22270
Conversation
…consumerList and dispatcher.consumerSet
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
.../java/org/apache/pulsar/broker/service/persistent/PersistentDispatcherMultipleConsumers.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #22270 +/- ##
============================================
+ Coverage 73.57% 73.68% +0.10%
- Complexity 32624 32802 +178
============================================
Files 1877 1887 +10
Lines 139502 139488 -14
Branches 15299 15293 -6
============================================
+ Hits 102638 102778 +140
+ Misses 28908 28750 -158
- Partials 7956 7960 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like we don't need this PR if we follow this comment to fix the issue. I have tested on my laptop.
Changed the implementation: Just add a defensive code to avoid the topic not being unloaded anymore: remove the consumers which are not mismatched between |
/pulsarbot rerun-failure-checks |
…cher.consumerList and dispatcher.consumerSet (apache#22270) (cherry picked from commit cba1600) (cherry picked from commit 94edfe4)
…cher.consumerList and dispatcher.consumerSet (apache#22270) (cherry picked from commit cba1600) (cherry picked from commit 94edfe4)
…cher.consumerList and dispatcher.consumerSet (apache#22270) (cherry picked from commit cba1600) (cherry picked from commit 94edfe4)
…cher.consumerList and dispatcher.consumerSet (apache#22270) (cherry picked from commit cba1600) (cherry picked from commit 94edfe4)
…cher.consumerList and dispatcher.consumerSet (apache#22270) (cherry picked from commit cba1600) (cherry picked from commit 94edfe4)
…cher.consumerList and dispatcher.consumerSet (apache#22270) (cherry picked from commit cba1600)
Motivation
The logs were printed on our cluster(
2.11.2
){clientCnx 127.0.0.6:44907, consumerId: 18}
has been removed twice when callingdispatcher.disconnectAllConsumers
.[1]Trying to remove a non-connected consumer
when removing the consumer{clientCnx 127.0.0.6:44907, consumerId: 18}
at the second time, which means this consumer is duplicated indispatcher.consumerList
.[2]closeFuture
ofdispatcher
will never be completed, leading to the process oftopic.delete
being stuck.[1]: dispatcher.disconnectAllConsumers
[2]: dispatcher.removeConsumer
Modifications
I haven't found the logic of repeating consumer in
dispatcher.consumerList
yet(it may caused by a consumer that has been added twice, anddispatcher.consumerSet
merged two adding), I just fixed the follow-up issue.Documentation
doc
doc-required
doc-not-needed
doc-complete
Matching PR in forked repository
PR in forked repository: x