-
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] Msg delivery is stuck due to items in the collection recentlyJoinedConsumers are out-of-order #23795
[fix] [broker] Msg delivery is stuck due to items in the collection recentlyJoinedConsumers are out-of-order #23795
Conversation
… un-thread-safety collection recentlyJoinedConsumers
/pulsarbot rerun-failure-checks |
… un-thread-safety collection recentlyJoinedConsumers
… un-thread-safety collection recentlyJoinedConsumers
.../pulsar/broker/service/persistent/PersistentStickyKeyDispatcherMultipleConsumersClassic.java
Outdated
Show resolved
Hide resolved
.../pulsar/broker/service/persistent/PersistentStickyKeyDispatcherMultipleConsumersClassic.java
Outdated
Show resolved
Hide resolved
.../pulsar/broker/service/persistent/PersistentStickyKeyDispatcherMultipleConsumersClassic.java
Show resolved
Hide resolved
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #23795 +/- ##
============================================
+ Coverage 73.57% 74.14% +0.56%
+ Complexity 32624 31761 -863
============================================
Files 1877 1853 -24
Lines 139502 143412 +3910
Branches 15299 16286 +987
============================================
+ Hits 102638 106326 +3688
+ Misses 28908 28711 -197
- Partials 7956 8375 +419
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.
LGTM
…nsumers are out-of-order (apache#23795) (cherry picked from commit 4a01423) (cherry picked from commit ca535a2)
…nsumers are out-of-order (apache#23795) (cherry picked from commit 4a01423) (cherry picked from commit ca535a2)
Motivation
Version:
3.0.7
, thanks for @shibd investigating the issue together and mentioning the key clue that items are out of order.Issue 1: concurrentcy access a un-thread-safety collection
recentlyJoinedConsumers
ofPersistentStickyKeyDispatcherMultipleConsumers
is used to guarantee the delivery order of Key_Shared subscriptions, which is not a thread-safety collection.Issue 2: the items in
recentlyJoinedConsumers
are out of order104142:122103
104142:122103
104046:283984
104046:284275
But we have more than one place that relies on the order rule, such as follows
Modifications
recentlyJoinedConsumers
when adding/removing consumers, I have not found the root cause of items inrecentlyJoinedConsumers
being out of order, I will continue working on it. Before that let us fix the issue fastDocumentation
doc
doc-required
doc-not-needed
doc-complete
Matching PR in forked repository
PR in forked repository: x