-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[fix] [broker] Msg delivery is stuck due to items in the collection recentlyJoinedConsumers are out-of-order #23795
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
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
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.
|
lhotari
left a comment
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)
…centlyJoinedConsumers are out-of-order (apache#23795)
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
recentlyJoinedConsumersofPersistentStickyKeyDispatcherMultipleConsumersis used to guarantee the delivery order of Key_Shared subscriptions, which is not a thread-safety collection.Issue 2: the items in
recentlyJoinedConsumersare out of order104142:122103104142:122103104046:283984104046:284275But we have more than one place that relies on the order rule, such as follows
Modifications
recentlyJoinedConsumerswhen adding/removing consumers, I have not found the root cause of items inrecentlyJoinedConsumersbeing out of order, I will continue working on it. Before that let us fix the issue fastDocumentation
docdoc-requireddoc-not-neededdoc-completeMatching PR in forked repository
PR in forked repository: x