Repository navigation
Fix message TTL on Key_Shared subscription and Fix ordering issue when replay messages. - #8292
Merged
Merged
Conversation
…n replay messages.
codelipenghui
requested review from
jiazhai,
merlimat,
rdhabalia and
sijie
and removed request for
merlimat
October 19, 2020 04:39
Member
|
/pulsarbot run-failure-checks |
1 similar comment
Member
|
/pulsarbot run-failure-checks |
jiazhai
approved these changes
Oct 19, 2020
merlimat
approved these changes
Oct 19, 2020
huangdx0726
pushed a commit
to huangdx0726/pulsar
that referenced
this pull request
Nov 13, 2020
…n replay messages. (apache#8292)
flowchartsman
pushed a commit
to flowchartsman/pulsar
that referenced
this pull request
Nov 17, 2020
…n replay messages. (apache#8292)
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.
Related to #8115 #7455
Motivation
Fix message TTL on Key_Shared subscription.
The message TTL will move the mark delete position of the cursor. But did not trigger read entries for the Key_Shared subscription. This will lead to an earlier position which does not acked cause consumers under the Key_Shared subscription stucked even if users enable the message TTL.
Fix ordering issue when replaying messages in the Key_Shared subscription.
For example, we have 10 messages [0,1,2,3,4,5,6,7,8,9]
If the consumer0 get message 0 and 1, and does not acked message 0, then consumer1 joined,
when consumer1 get message 2,3, the broker will not dispatch messages to consumer1
because of the mark delete position did not move forward. So message 2,3 will stored in the redeliver tracker.
Now, consumer2 joined, it will read new messages from the cursor, so the recentJoinedPosition is 4 for consumer2
Because of there are messages that need to redeliver, so the broker will read the redelivery message first [2,3]
message [2,3] is lower than the recentJoinedPosition 4, so the message [2,3] will be dispatched to the consumer2
But the message [2,3] should not dispatch to consumer2.
Verifying this change
Does this pull request potentially affect one of the following parts:
If
yeswas chosen, please highlight the changesDocumentation