-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[fix] [broker] Fix items in dispatcher.recentlyJoinedConsumers are out-of-order, which may cause a delivery stuck #23802
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] Fix items in dispatcher.recentlyJoinedConsumers are out-of-order, which may cause a delivery stuck #23802
Conversation
…t-of-order, which may cause a delivery stuck
|
/pulsarbot rerun-failure-checks |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #23802 +/- ##
============================================
+ Coverage 73.57% 74.12% +0.55%
+ Complexity 32624 2374 -30250
============================================
Files 1877 1853 -24
Lines 139502 143456 +3954
Branches 15299 16291 +992
============================================
+ Hits 102638 106338 +3700
+ Misses 28908 28716 -192
- Partials 7956 8402 +446
Flags with carried forward coverage won't be shown. Click here to find out more.
|
...rg/apache/pulsar/broker/service/persistent/PersistentDispatcherMultipleConsumersClassic.java
Outdated
Show resolved
Hide resolved
.../pulsar/broker/service/persistent/PersistentStickyKeyDispatcherMultipleConsumersClassic.java
Show resolved
Hide resolved
|
@poorbarcode Please also help summarize the discussion between us to the PR description. I think it should be added to the |
Added |
…t-of-order, which may cause a delivery stuck (apache#23802) (cherry picked from commit 3d71c87) (cherry picked from commit 5cec5ed)
…t-of-order, which may cause a delivery stuck (apache#23802) (cherry picked from commit 3d71c87) (cherry picked from commit 5cec5ed)
…t-of-order, which may cause a delivery stuck (apache#23802)
…t-of-order, which may cause a delivery stuck (apache#23802)
Motivation
Background
rewindrewindwill be delayed after the pending read is complete.dispatcher.recentlyJoinedConsumersofkey_sharedmode guarantees delivery in order, it records thecursor.readPositionwhen consumers join.Issue: a case that makes items in
dispatcher.recentlyJoinedConsumersout-of-order, the steps to reproduce the issue are as follows:3consumers:c1,c2,c3c1andc2consumed all messages that they received.c3is stuckLAC:3:299,cursor.readPosition:3:300,mard-deleted-position:3:100c3afterc3is removed.c1andc2are also off-line, which will trigger arewindrewindwill be delayed.consumer-4joined, itsrecentlyJoinedPositionwas set to3:300rewindwas triggered.LAC:3:299,cursor.readPosition:3:101,mard-deleted-position:3:100consumer-5joined, itsrecentlyJoinedPositionwas set to3:101you can reproduce the issue by the new test
NonEntryCacheKeySharedSubscriptionV30TestModifications
rewindwas executed, clear the collectiondispatcher.recentlyJoinedConsumersDocumentation
docdoc-requireddoc-not-neededdoc-completeMatching PR in forked repository
PR in forked repository: x