Clean up individually deleted messages before the mark-delete position - #14261
Merged
merlimat merged 1 commit intoFeb 14, 2022
Merged
Conversation
merlimat
requested review from
BewareMyPower,
addisonj,
aloyszhang,
codelipenghui and
rdhabalia
February 14, 2022 03:10
codelipenghui
approved these changes
Feb 14, 2022
merlimat
added a commit
that referenced
this pull request
Feb 14, 2022
merlimat
added a commit
that referenced
this pull request
Feb 14, 2022
Member
|
This fix reminds me of the issue I was seeing in #10054 with replicated subscriptions. In that case, it seems that because of the "marker messages" being acknowledged automatically, the messages get deleted out of order in all cases where the consumer doesn't keep up with the producer. This explains the |
nicoloboschi
pushed a commit
to datastax/pulsar
that referenced
this pull request
Mar 31, 2022
apache#14261) (cherry picked from commit 6d717a0)
nicoloboschi
added a commit
to datastax/pulsar
that referenced
this pull request
Mar 31, 2022
apache#14261) (cherry picked from commit 6d717a0)
This was referenced Apr 5, 2022
lhotari
pushed a commit
that referenced
this pull request
Apr 6, 2022
lhotari
pushed a commit
to datastax/pulsar
that referenced
this pull request
Apr 6, 2022
apache#14261) (cherry picked from commit 5f5b45e)
Nicklee007
pushed a commit
to Nicklee007/pulsar
that referenced
this pull request
Apr 20, 2022
4 tasks
Shawyeok
pushed a commit
to Shawyeok/pulsar
that referenced
this pull request
Sep 6, 2022
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
If there are individually deleted messages that are pointing to before the mark-delete position, that will cause a situation in which the
cursor.delete()calls will fail to move the mark-delete position anymore (at least until an explicitcursor.markDelete()is called).The problem is that we are comparing the upper-value of the first range and if that is lower, it would be trying to mark-delete an earlier position and get error.