[fix] [broker] Fix items in dispatcher.recentlyJoinedConsumers are out-of-order, which may cause a delivery stuck - #23802
Merged
poorbarcode merged 6 commits intoJan 3, 2025
Conversation
…t-of-order, which may cause a delivery stuck
poorbarcode
requested review from
Technoboy-,
codelipenghui,
gaoran10,
lhotari and
shibd
January 2, 2025 10:57
Open
4 tasks
Member
|
/pulsarbot rerun-failure-checks |
shibd
approved these changes
Jan 2, 2025
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.
|
Technoboy-
reviewed
Jan 3, 2025
Technoboy-
approved these changes
Jan 3, 2025
codelipenghui
approved these changes
Jan 3, 2025
Contributor
|
@poorbarcode Please also help summarize the discussion between us to the PR description. I think it should be added to the |
gaoran10
approved these changes
Jan 3, 2025
Contributor
Author
Added |
nikhil-ctds
pushed a commit
to datastax/pulsar
that referenced
this pull request
Jan 7, 2025
…t-of-order, which may cause a delivery stuck (apache#23802) (cherry picked from commit 3d71c87) (cherry picked from commit 5cec5ed)
srinath-ctds
pushed a commit
to datastax/pulsar
that referenced
this pull request
Jan 8, 2025
…t-of-order, which may cause a delivery stuck (apache#23802) (cherry picked from commit 3d71c87) (cherry picked from commit 5cec5ed)
poorbarcode
added a commit
to poorbarcode/pulsar
that referenced
this pull request
Jan 23, 2025
…t-of-order, which may cause a delivery stuck (apache#23802)
hanmz
pushed a commit
to hanmz/pulsar
that referenced
this pull request
Feb 12, 2025
…t-of-order, which may cause a delivery stuck (apache#23802)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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